/**
 * Padel Tournament Pro - Public Styles
 * Club Registration Form Styles
 * @version 3.0.0
 */

/* ============================================
   CLUB REGISTRATION FORM
   ============================================ */

.padel-club-registration-form {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.padel-club-registration-form h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #0066cc;
    padding-bottom: 20px;
}

/* ============================================
   NOTICES (Success/Error Messages)
   ============================================ */

.padel-notice {
    padding: 16px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
}

.padel-notice-success {
    background-color: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.padel-notice-error {
    background-color: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.padel-notice p {
    margin: 0;
}

/* ============================================
   FORM SECTIONS
   ============================================ */

.form-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}

.form-section h3 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0066cc;
}

/* ============================================
   FORM FIELDS
   ============================================ */

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
}

.form-field label::after {
    content: '';
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="url"],
.form-field input[type="number"],
.form-field input[type="password"],
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #999;
    font-style: italic;
}

/* Required field indicator */
.form-field label[for*="club_name"]::after,
.form-field label[for*="club_address"]::after,
.form-field label[for*="club_city"]::after,
.form-field label[for*="club_state"]::after,
.form-field label[for*="club_country"]::after,
.form-field label[for*="club_email"]::after,
.form-field label[for*="club_phone"]::after,
.form-field label[for*="user_login"]::after,
.form-field label[for*="user_email"]::after,
.form-field label[for*="user_password"]::after,
.form-field label[for*="confirm_password"]::after {
    content: ' *';
    color: #dc3545;
    font-weight: bold;
}

/* ============================================
   FORM ROW (Two columns)
   ============================================ */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   NUMBER OF COURTS FIELD
   ============================================ */

.form-field input[type="number"] {
    max-width: 150px;
}

/* ============================================
   SOCIAL MEDIA SECTION
   ============================================ */

.form-section.social-media {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.form-section.social-media h3 {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.form-section.social-media label {
    color: rgba(255, 255, 255, 0.95);
}

.form-section.social-media input {
    background: rgba(255, 255, 255, 0.95);
}

/* ============================================
   ADMIN ACCOUNT SECTION
   ============================================ */

.form-section.admin-account {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
}

.form-section.admin-account h3 {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.form-section.admin-account label {
    color: rgba(255, 255, 255, 0.95);
}

.form-section.admin-account input {
    background: rgba(255, 255, 255, 0.95);
}

.form-section.admin-account p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-top: 10px;
}

/* ============================================
   PASSWORD REQUIREMENTS
   ============================================ */

.password-requirements {
    margin-top: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 13px;
}

.password-requirements ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
    list-style: disc;
}

.password-requirements li {
    margin: 3px 0;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.form-submit button[type="submit"],
.form-submit input[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    font-weight: 700;
    padding: 16px 50px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-submit button[type="submit"]:hover,
.form-submit input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.form-submit button[type="submit"]:active,
.form-submit input[type="submit"]:active {
    transform: translateY(0);
}

/* ============================================
   LOADING STATE
   ============================================ */

.form-submit button[type="submit"]:disabled,
.form-submit input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-submit.loading button::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .padel-club-registration-form {
        padding: 20px 15px;
        margin: 20px 10px;
    }

    .padel-club-registration-form h2 {
        font-size: 24px;
    }

    .form-section {
        padding: 15px;
    }

    .form-section h3 {
        font-size: 18px;
    }

    .form-submit button[type="submit"],
    .form-submit input[type="submit"] {
        width: 100%;
        font-size: 16px;
        padding: 14px 30px;
    }
}

/* ============================================
   EMOJIS IN HEADINGS (Better rendering)
   ============================================ */

.form-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   HELPER TEXT / DESCRIPTIONS
   ============================================ */

.form-field .description,
.form-field small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
}

.form-section.admin-account .description {
    color: rgba(255, 255, 255, 0.85);
}

.form-section.social-media .description {
    color: rgba(255, 255, 255, 0.85);
}

/* ============================================
   VALIDATION STATES
   ============================================ */

.form-field input.invalid,
.form-field textarea.invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-field input.valid,
.form-field textarea.valid {
    border-color: #28a745;
    background-color: #f1f9f1;
}

.form-field .error-message {
    display: block;
    margin-top: 6px;
    color: #dc3545;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.form-field input:focus-visible,
.form-field textarea:focus-visible,
.form-field select:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .padel-club-registration-form {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .form-submit {
        display: none;
    }

    .form-section.social-media,
    .form-section.admin-account {
        background: none !important;
        color: black !important;
        border: 1px solid #ddd !important;
    }

    .form-section.social-media h3,
    .form-section.admin-account h3,
    .form-section.social-media label,
    .form-section.admin-account label {
        color: black !important;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

.form-section {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for sections */
.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }
.form-section:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   FOCUS STYLES (Better UX)
   ============================================ */

.form-field input:focus + label,
.form-field textarea:focus + label {
    color: #0066cc;
}

/* ============================================
   PLACEHOLDER IMPROVEMENTS
   ============================================ */

.form-field input:focus::placeholder,
.form-field textarea:focus::placeholder {
    opacity: 0.5;
}
