﻿/**
 * Consolidated Modal Styles
 * This file contains all modal-related styles from individual Razor components
 */

/* ==================== Closure Modal (BusinessHoursPresentation/Components/ClosureModal) ==================== */
.closure-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.closure-modal {
    background: white;
    border-radius: 16px;
    width: 450px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.closure-modal-header {
    background: #f8f9fa;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.closure-modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

@media (max-width: 576px) {
    .closure-modal {
        width: 95vw;
        margin: 1rem;
    }

    .closure-modal-header {
        padding: 0.875rem 1rem;
    }

    .closure-modal-body {
        padding: 1.25rem;
    }
}

/* ==================== Business Hour Modal (BusinessHoursPresentation/Components/BusinessHourModal) ==================== */
.business-hour-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.business-hour-modal {
    background: white;
    border-radius: 16px;
    width: 420px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.business-hour-modal-header {
    background: #f8f9fa;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.business-hour-modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.time-range-field {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.half-width {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .business-hour-modal {
        width: 95vw;
        margin: 1rem;
    }

    .business-hour-modal-header {
        padding: 0.875rem 1rem;
    }

    .business-hour-modal-body {
        padding: 1.25rem;
    }

    .time-range-field {
        flex-direction: column;
        gap: 0;
    }

    .half-width {
        margin-bottom: 1.25rem;
    }
}

/* ==================== Product Editor Modal (ProductsPresentation/Components/ProductEditorModal) ==================== */
.modal-dialog.modal-fullscreen {
    margin: 0;
    max-width: 100%;
    height: 100vh;
}

.modal-fullscreen .modal-content {
    height: 100vh;
    border: none;
    border-radius: 0;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

.modal-title i {
    margin-right: 0.75rem;
}

.btn-close {
    opacity: 0.8;
    font-size: 18px;
}

.btn-close:hover {
    opacity: 1;
}

.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: calc(100vh - 120px);
    gap: 0;
}

@media (max-width: 1200px) {
    .editor-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
}

@media (max-width: 768px) {
    .modal-fullscreen .modal-content {
        height: 100vh;
    }

    .editor-container {
        height: calc(100vh - 100px);
    }
}

/* ==================== Appointment Modal (SchedulerComponets/Components/AppointmentModal) ==================== */
.appointment-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.appointment-modal {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 400px;
    max-width: 95vw;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.appointment-modal-header {
    background-color: #e9ecef;
    border-bottom: none;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
}

.appointment-modal-body {
    padding: 24px 20px;
    background-color: white;
    overflow-y: auto;
    max-height: calc(90vh - 150px);
}

@media (max-width: 768px) {
    .appointment-modal {
        width: 95vw;
        max-height: 95vh;
        margin: 0;
    }

    .appointment-modal-header {
        padding: 16px;
    }

    .appointment-modal-body {
        max-height: calc(90vh - 120px);
    }
}

/* ==================== Service Editor Modal (ServicesPresentation/Components/ServiceEditorModal) ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.modal-dialog-custom {
    background: white;
    border-radius: 20px;
    width: 550px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.modal-content-custom {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.modal-header-custom {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.modal-header-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.modal-title-custom {
    margin: 0;
    font-weight: 600;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.modal-title-custom i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.btn-close-custom {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    transition: all 0.25s ease;
    opacity: 0.9;
    z-index: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-custom:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transform: scale(1.05);
}

.btn-close-custom:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.modal-body-custom {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    background: white;
}

.modal-footer-custom {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 20px 20px;
}

.btn-secondary-custom {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #495057;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.btn-secondary-custom:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-1px);
}

.btn-secondary-custom:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary-custom {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(32, 201, 151, 0.25);
}

.btn-primary-custom:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(32, 201, 151, 0.35);
}

.btn-primary-custom:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .modal-dialog-custom {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header-custom {
        padding: 1rem 1.5rem;
    }

    .modal-title-custom {
        font-size: 1.2rem;
    }

    .modal-title-custom i {
        font-size: 1.1rem;
    }

    .modal-body-custom {
        padding: 1.5rem;
    }

    .modal-footer-custom {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer-custom button {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== Image Upload Modal (ImagesPresentation/Components/ImageUploadModal) ==================== */
.upload-section {
    height: 100%;
}

.preview-section {
    height: 100%;
}

.image-preview {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background: white;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview-image {
    width: 200px;
    height: 200px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
}

.preview-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.modal-lg {
    max-width: 800px;
}

@media (max-width: 768px) {
    .image-preview {
        min-height: 200px;
    }

    .preview-image {
        max-height: 150px;
    }
}

/* ==================== Operator Editor Modal (OperatorsPresentation/Components/OperatorEditorModal) ==================== */
.operator-editor-modal .modal-content {
    border-radius: 12px !important;
    border: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.operator-editor-modal .modal-header {
    background: linear-gradient(135deg, #20c997, #28a745) !important;
    color: white !important;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    padding: 1.5rem 2rem;
}

.operator-editor-modal .modal-body {
    padding: 2rem;
    background: white;
}

.operator-editor-modal .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 1.5rem 2rem;
    border-radius: 0 0 12px 12px;
}

@media (max-width: 768px) {
    .operator-editor-modal .modal-dialog {
        margin: 1rem;
    }

    .operator-editor-modal .modal-header,
    .operator-editor-modal .modal-body,
    .operator-editor-modal .modal-footer {
        padding: 1rem 1.5rem;
    }

    .operator-editor-modal .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .operator-editor-modal .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== Operator Schedule Modal (OperatorsPresentation/Components/OperatorScheduleModal) ==================== */
.operator-schedule-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    backdrop-filter: blur(3px);
}

.operator-schedule-modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
}

.operator-schedule-modal-header {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.operator-schedule-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.operator-schedule-modal-body {
    padding: 2rem;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

@media (max-width: 576px) {
    .operator-schedule-modal {
        width: 95%;
        margin: 1rem;
    }

    .operator-schedule-modal-header {
        padding: 1rem 1.5rem;
    }

    .operator-schedule-modal-body {
        padding: 1.5rem;
    }
}

/* ==================== Common Modal Utilities ==================== */
.header-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-save {
    background: #28a745;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
}

.btn-save:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* ==================== Operator Assignment Modal (BusinessHoursPresentation/Components/OperatorAssignmentModal) ==================== */
.operator-assignment-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.operator-assignment-modal {
    background: white;
    border-radius: 16px;
    width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.operator-assignment-modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e9ecef;
}

.operator-assignment-modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

@media (max-width: 576px) {
    .operator-assignment-modal {
        width: 95vw;
        margin: 1rem;
    }

    .operator-assignment-modal-header {
        padding: 0.875rem 1rem;
    }

    .operator-assignment-modal-body {
        padding: 1.25rem;
    }
}
