/* Eye Care Reservation Plugin - Public Styles */

.eye-care-reservation-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ecr-form-title {
    text-align: center;
    color: #333;
    font-size: 2.2rem;
    margin-bottom: 30px;
    font-weight: 600;
    position: relative;
}

.ecr-form-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Messages */
.ecr-messages {
    margin-bottom: 25px;
    border-radius: 10px;
    overflow: hidden;
}

.ecr-success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    font-weight: 500;
}

.ecr-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    font-weight: 500;
}

/* Form Layout */
.ecr-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.ecr-form-group {
    display: flex;
    flex-direction: column;
}

.ecr-form-group.ecr-full-width {
    grid-column: 1 / -1;
}

.ecr-form-group label {
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.required {
    color: #e74c3c;
    margin-left: 4px;
    font-weight: bold;
}

/* Form Controls */
.ecr-form-group input,
.ecr-form-group textarea,
.ecr-form-group select {
    padding: 12px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9ff;
    font-family: inherit;
}

.ecr-form-group input:focus,
.ecr-form-group textarea:focus,
.ecr-form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ecr-form-group input.error,
.ecr-form-group textarea.error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.ecr-form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* Error Messages */
.ecr-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
    min-height: 20px;
}

.ecr-help-text {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 4px;
    font-style: italic;
}

/* Submit Button */
.ecr-form-actions {
    text-align: center;
}

.ecr-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.ecr-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.ecr-submit-btn:active {
    transform: translateY(0);
}

.ecr-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ecr-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ecr-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Reservations List */
.eye-care-reservations-list {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
}

.ecr-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.ecr-search-container {
    position: relative;
    max-width: 300px;
    flex: 1;
}

.ecr-search-input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    border: 2px solid #e0e6ed;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.ecr-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ecr-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    left: 255px;
    border: 1px solid #ededed;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 20px;
}

.ecr-view-btn {
    background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ecr-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(54, 209, 220, 0.4);
    color: white;
    text-decoration: none;
}

/* Reservation Items */
.ecr-reservations-container {
    display: grid;
    gap: 20px;
}

.ecr-reservation-item {
    background: #ffffff;
    border: 2px solid #e0e6ed;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ecr-reservation-item:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.ecr-reservation-item.checked {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f9f0 100%);
    border-color: #27ae60;
}

.ecr-reservation-item.checked::before {
    content: '✓';
    position: absolute;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.ecr-reservation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.ecr-patient-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.ecr-reservation-date {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.ecr-reservation-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.ecr-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ecr-info-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ecr-info-value {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.ecr-eye-problem {
    grid-column: 1 / -1;
}

.ecr-eye-problem .ecr-info-value {
    background: #f8f9ff;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    line-height: 1.6;
    margin-top: 8px;
}

/* Modal Styles */
.ecr-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.ecr-modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ecr-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    position: relative;
}

.ecr-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.ecr-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.ecr-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ecr-modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Loading States */
.ecr-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
    font-size: 1.1rem;
}

.ecr-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e0e6ed;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Empty State */
.ecr-empty-state {
    text-align: center;
    padding: 60px 30px;
    color: #6c757d;
}

.ecr-empty-icon {
    font-size: 4rem;
    color: #e0e6ed;
    margin-bottom: 20px;
}

.ecr-empty-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}

.ecr-empty-text {
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .eye-care-reservation-wrapper {
        margin: 20px;
        padding: 25px;
        border-radius: 15px;
    }
    
    .ecr-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ecr-form-title {
        font-size: 1.8rem;
    }
    
    .ecr-list-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ecr-search-container {
        max-width: none;
    }
    
    .ecr-reservation-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .ecr-modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .ecr-modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .eye-care-reservation-wrapper,
    .eye-care-reservations-list {
        margin: 10px;
        padding: 20px;
    }
    
    .ecr-submit-btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .ecr-reservation-item {
        padding: 20px;
    }
    
    .ecr-patient-name {
        font-size: 1.1rem;
    }
    
    .ecr-reservation-date {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}