/* ============================================
   Common Styles for Flask Application
   ============================================ */

/* --------------------- 
   Reset & Base Styles 
   --------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #5FCCEE;
    background: linear-gradient(0deg,rgba(95, 204, 238, 1) 70%, rgba(22, 131, 163, 1) 100%);
    min-height: 100vh;
    padding: 20px;
}

/* --------------------- 
   Container & Layout 
   --------------------- */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: #636464;
    background: linear-gradient(90deg,rgba(99, 100, 100, 1) 50%, rgba(124, 114, 75, 1) 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 32px;
    line-height: 1.3;
}

.content {
    padding: 40px;
}

/* --------------------- 
   Buttons 
   --------------------- */
.btn {
    background: linear-gradient(90deg,rgba(99, 100, 100, 1) 0%, rgba(124, 114, 75, 1) 96%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
    display: inline-block;
    min-height: 48px;
    min-width: 120px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-small {
    padding: 8px 15px;
    font-size: 14px;
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
    min-width: auto;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-cancel {
    background: #6c757d;
}

.btn-cancel:hover {
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

/* --------------------- 
   Forms & Inputs 
   --------------------- */
input[type="email"],
input[type="tel"],
input[type="file"],
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

input[type="email"]:focus,
input[type="tel"]:focus,
input[type="file"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-weight: 500;
    font-size: 15px;
}

.upload-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.upload-form input[type="file"] {
    flex: 1;
    min-width: 200px;
}

/* --------------------- 
   Tables 
   --------------------- */



/* Column widths */
.col-tura { width: 5%; }
.col-email { width: 12%; }
.col-phone { width: 10%; }
.col-name { width: 8%; }
.col-surname { width: 10%; }
.col-birth { width: 8%; }
.col-guardian { width: 10%; }
.col-school { width: 7%; }
.col-paid { width: 8%; }
.col-actions { width: 22%; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    overflow-x: auto;
    display: block;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

thead, tbody {
    display: table;
    width: 100%;
    
}

th, td {

    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    word-wrap: break-word;
    padding: 8px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

tr:hover {
    background: #f8f9fa;
}

/* --------------------- 
   Badges 
   --------------------- */
.badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.badge-paid {
    background: #d4edda;
    color: #155724;
}

.badge-unpaid {
    background: #f8d7da;
    color: #721c24;
}

/* --------------------- 
   Counter 
   --------------------- */
.counter {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.counter-number {
    font-size: 48px;
    font-weight: bold;
    color: #667eea;
    line-height: 1.2;
}

.counter-label {
    font-size: 18px;
    color: #666;
    margin-top: 10px;
}

/* --------------------- 
   Flash Messages 
   --------------------- */
.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease-out;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --------------------- 
   Image Upload Section 
   --------------------- */
.image-upload-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px dashed #667eea;
}

.current-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.upload-info {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    color: #004085;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

/* --------------------- 
   Event Details 
   --------------------- */
.event-details h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
}

.event-details p {
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
}
.event-details li {
  line-height: 1.6;
  color: #666;
  font-size: 16px;
}
.event-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;

}

.image-container {
    text-align: center;
    margin-bottom: 30px;
}

.registration-modal {
    display: none;
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.registration-modal h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

.button-group {
    margin-top: 20px;
    text-align: center;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button-group .btn {
    flex: 1;
    min-width: 120px;
}

.cta-container {
    text-align: center;
    margin-top: 30px;
}
.program-list {
        margin-left: 15px;
        margin-bottom: 10px;
    }
/* --------------------- 
   Success Page 
   --------------------- */
.success-emoji {
    font-size: 80px;
    margin: 30px 0;
    line-height: 1;
}

.success-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 26px;
}

.success-message {
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
}

.info-box {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 10px;
    margin: 30px auto;
    max-width: 500px;
}

.info-box p {
    color: #2e7d32;
    margin: 0;
    line-height: 1.6;
    font-size: 15px;
}

.info-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.success-content {
    text-align: center;
}
.email-hidden {
    cursor: pointer;
}

.email-hidden .full-email {
    display: none;
}

.email-hidden:hover .full-email {
    display: inline;
}

.email-hidden:hover .short-email {
    display: none;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablets and Small Desktops */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 24px;
    }

    .header p {
        font-size: 14px;
    }

    .content {
        padding: 20px 15px;
    }

    .btn {
        padding: 14px 24px;
        font-size: 15px;
        width: 100%;
        max-width: 100%;
    }

    .btn-small {
        padding: 6px 10px;
        font-size: 12px;
        width: 100%;
        margin: 2px 0;
    }

    .counter-number {
        font-size: 36px;
    }

    .counter-label {
        font-size: 16px;
    }

    input[type="email"],
    input[type="tel"],
    input[type="file"],
    input[type="text"],
    input[type="password"] {
        font-size: 16px;
        padding: 12px;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 8px 4px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;

    }

    .section-header h2 {
        font-size: 20px;
    }

    .image-upload-section {
        padding: 15px;
    }

    .upload-form {
        flex-direction: column;
        width: 100%;
    }

    .upload-form input[type="file"] {
        width: 100%;
        min-width: auto;
    }

    .upload-form .btn {
        width: 100%;
    }

    .event-details h2 {
        font-size: 20px;
    }

    .event-details p {
        font-size: 15px;
    }

    .registration-modal {
        padding: 20px;
        margin-top: 20px;
    }

    .registration-modal h3 {
        font-size: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
        margin: 0;
    }

    .image-container {
        margin-bottom: 20px;
    }

    .success-emoji {
        font-size: 64px;
        margin: 20px 0;
    }

    .success-title {
        font-size: 22px;
    }

    .success-message {
        font-size: 15px;
        padding: 0 10px;
    }

    .info-box {
        padding: 18px;
        margin: 20px auto;
    }

    .info-box p {
        font-size: 14px;
    }

    .info-box strong {
        font-size: 15px;
    }

}

/* Mobile Phones */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .container {
        border-radius: 10px;
    }

    .header {
        padding: 15px 10px;
    }

    .header h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .content {
        padding: 15px;
    }

    .counter {
        padding: 15px;
        margin: 15px 0;
    }

    .counter-number {
        font-size: 32px;
    }

    .counter-label {
        font-size: 14px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 6px 2px;
    }

    .badge {
        font-size: 10px;
        padding: 3px 6px;
    }

    .image-upload-section {
        padding: 12px;
    }

    .upload-info {
        font-size: 12px;
        padding: 12px;
    }

    .event-details h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .event-details p {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .registration-modal {
        padding: 15px;
    }

    .registration-modal h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 14px;
    }

    .cta-container {
        margin-top: 20px;
    }

    .success-emoji {
        font-size: 56px;
        margin: 15px 0;
    }

    .success-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .success-message {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 20px;
    }

    .info-box {
        padding: 15px;
        margin: 20px 10px;
    }

    .info-box p {
        font-size: 13px;
    }

    .info-box strong {
        font-size: 14px;
        margin-bottom: 6px;
    }

}
