/* Persian Date Picker Styles */
.persian-datepicker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.persian-datepicker-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.persian-datepicker-container {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 380px;
    max-width: 95vw;
    padding: 0;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.persian-datepicker-header {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    padding: 1.5rem;
    text-align: center;
    color: white;
}

.persian-datepicker-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.persian-datepicker-header p {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.persian-datepicker-body {
    padding: 1.5rem;
}

.datepicker-section {
    margin-bottom: 1.5rem;
}

.datepicker-section:last-child {
    margin-bottom: 0;
}

.datepicker-section label {
    display: block;
    color: var(--text-primary, #e2e8f0);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.datepicker-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary, #0f172a);
    border: 1px solid var(--border-color, #334155);
    border-radius: 10px;
    color: var(--text-primary, #e2e8f0);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%23e2e8f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 8 10 12 14 8'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    padding-left: 2.5rem;
}

.datepicker-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.datepicker-select:hover {
    border-color: #3b82f6;
}

.datepicker-select option {
    background: var(--bg-primary, #0f172a);
    color: var(--text-primary, #e2e8f0);
    padding: 0.5rem;
}

.persian-datepicker-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary, #1e293b);
    border-top: 1px solid var(--border-color, #334155);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.datepicker-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.datepicker-btn-confirm {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.datepicker-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.datepicker-btn-cancel {
    background: var(--bg-primary, #0f172a);
    color: var(--text-primary, #e2e8f0);
    border: 1px solid var(--border-color, #334155);
}

.datepicker-btn-cancel:hover {
    background: var(--hover-bg, #334155);
}

.datepicker-btn:active {
    transform: translateY(0);
}

/* Input with icon */
.date-input-wrapper {
    position: relative;
}

.date-input-wrapper input {
    padding-right: 2.5rem !important;
}

.date-input-icon {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary, #94a3b8);
    pointer-events: none;
    font-size: 1.1rem;
}

/* Make date inputs readonly and cursor pointer */
input.persian-date-input {
    cursor: pointer;
    user-select: none;
}

input.persian-date-input:focus {
    cursor: pointer;
}

/* Selected date preview */
.selected-date-preview {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.selected-date-preview .date-display {
    font-size: 1.5rem;
    font-weight: 600;
    color: #3b82f6;
    direction: ltr;
}

.selected-date-preview .date-label {
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
    margin-top: 0.25rem;
}

/* Close button */
.datepicker-close-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    z-index: 1;
}

.datepicker-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 480px) {
    .persian-datepicker-container {
        width: 90vw;
    }
    
    .persian-datepicker-header h3 {
        font-size: 1.1rem;
    }
    
    .datepicker-select {
        font-size: 0.9rem;
    }
}
