/**
 * Event Attendee Info - Styles
 */

/* ==========================================================================
   Main Wrapper
   ========================================================================== */

.eai-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.eai-continue-btn,
.eai-back-btn,
.eai-proceed-btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 180px;
}

.eai-continue-btn,
.eai-proceed-btn {
    background-color: #0071a1;
    color: #fff;
}

.eai-continue-btn:hover,
.eai-proceed-btn:hover {
    background-color: #005177;
    color: #fff;
}

.eai-back-btn {
    background-color: #f0f0f0;
    color: #333;
    margin-right: 10px;
}

.eai-back-btn:hover {
    background-color: #e0e0e0;
}

.eai-proceed-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ==========================================================================
   Form Container
   ========================================================================== */

.eai-attendee-form-container {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.eai-form-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0071a1;
}

.eai-form-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.eai-description {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* ==========================================================================
   Attendee Cards
   ========================================================================== */

.eai-attendees-forms {
    margin-bottom: 25px;
}

.eai-attendee-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.eai-attendee-card:last-child {
    margin-bottom: 0;
}

.eai-attendee-card.expanded {
    border-color: #0071a1;
}

.eai-attendee-card.collapsed .eai-card-body {
    display: none;
}

.eai-card-header {
    background: #f5f5f5;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.eai-attendee-card.expanded .eai-card-header {
    background: #0071a1;
    color: #fff;
}

.eai-card-header:hover {
    background: #e8e8e8;
}

.eai-attendee-card.expanded .eai-card-header:hover {
    background: #005177;
}

.eai-card-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.eai-attendee-card.expanded .eai-card-header h4 {
    color: #fff;
}

.eai-toggle-card {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 20px;
    color: #666;
    transition: transform 0.3s ease;
}

.eai-attendee-card.expanded .eai-toggle-card {
    color: #fff;
}

.eai-toggle-card:hover {
    transform: scale(1.2);
}

.eai-toggle-icon {
    display: inline-block;
    font-weight: bold;
}

.eai-card-body {
    padding: 20px;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.eai-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.eai-form-row:last-child {
    margin-bottom: 0;
}

.eai-form-group {
    flex: 1;
    min-width: 0;
}

.eai-form-group.eai-full-width {
    flex: 1 1 100%;
}

.eai-form-group.eai-half-width {
    flex: 1 1 calc(50% - 7.5px);
    min-width: 200px;
}

.eai-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.eai-form-group label .required {
    color: #e74c3c;
    font-weight: bold;
}

.eai-input,
.eai-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.eai-input:focus,
.eai-textarea:focus {
    outline: none;
    border-color: #0071a1;
    box-shadow: 0 0 0 3px rgba(0, 113, 161, 0.1);
}

.eai-input.error,
.eai-textarea.error {
    border-color: #e74c3c;
}

.eai-input.error:focus,
.eai-textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.eai-textarea {
    resize: vertical;
    min-height: 80px;
}

.eai-input::placeholder,
.eai-textarea::placeholder {
    color: #999;
}

/* ==========================================================================
   Form Actions
   ========================================================================== */

.eai-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.eai-messages {
    margin-top: 20px;
}

.eai-error,
.eai-success {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.eai-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.eai-success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

/* ==========================================================================
   Continue Container
   ========================================================================== */

.eai-continue-container {
    margin: 20px 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .eai-form-group.eai-half-width {
        flex: 1 1 100%;
    }
    
    .eai-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .eai-form-actions {
        flex-direction: column-reverse;
    }
    
    .eai-continue-btn,
    .eai-back-btn,
    .eai-proceed-btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .eai-back-btn {
        margin-right: 0;
    }
    
    .eai-attendee-form-container {
        padding: 15px;
    }
    
    .eai-card-body {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .eai-form-header h3 {
        font-size: 20px;
    }
    
    .eai-card-header h4 {
        font-size: 16px;
    }
    
    .eai-continue-btn,
    .eai-back-btn,
    .eai-proceed-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.eai-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.eai-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0071a1;
    border-radius: 50%;
    animation: eai-spin 1s linear infinite;
}

@keyframes eai-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   RTL Support (برای زبان فارسی)
   ========================================================================== */

[dir="rtl"] .eai-wrapper,
html[lang="fa"] .eai-wrapper,
html[lang="ar"] .eai-wrapper {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .eai-form-actions,
html[lang="fa"] .eai-form-actions,
html[lang="ar"] .eai-form-actions {
    justify-content: flex-start;
}

[dir="rtl"] .eai-back-btn,
html[lang="fa"] .eai-back-btn,
html[lang="ar"] .eai-back-btn {
    margin-right: 0;
    margin-left: 10px;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.eai-input:focus-visible,
.eai-textarea:focus-visible,
.eai-continue-btn:focus-visible,
.eai-back-btn:focus-visible,
.eai-proceed-btn:focus-visible,
.eai-toggle-card:focus-visible {
    outline: 2px solid #0071a1;
    outline-offset: 2px;
}

/* Screen reader only text */
.eai-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .eai-toggle-card,
    .eai-form-actions {
        display: none;
    }
    
    .eai-attendee-card.collapsed .eai-card-body {
        display: block;
    }
}
