﻿/**
 * Consolidated Form Styles
 * This file contains all form-related styles from individual Razor components
 */

/* ==================== File Upload with Drag and Drop ==================== */
.file-drop-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-drop-zone:hover {
    border-color: #20c997;
    background: #e6f9f4;
}

.file-drop-zone.drag-over {
    border-color: #20c997;
    background: #d1f5eb;
    border-width: 3px;
}

.file-drop-zone input[type="file"] {
    display: none;
}

.drop-zone-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.file-drop-zone.drag-over .drop-zone-icon {
    color: #20c997;
}

.drop-zone-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.drop-zone-subtext {
    font-size: 0.9rem;
    color: #718096;
}

.file-preview {
    margin-top: 1rem;
    max-width: 100%;
}

.file-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==================== Service Editor Modal Forms (ServicesPresentation/Components/ServiceEditorModal) ==================== */
.service-editor-modal .form-group-custom {
    margin-bottom: 1.5rem;
}

.service-editor-modal .form-label-custom {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.625rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-editor-modal .form-label-custom i {
    margin-right: 0.5rem;
    color: #20c997;
    width: 18px;
}

.service-editor-modal .form-control-custom {
    width: 100%;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 0.85rem 1.15rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #2d3748;
    font-weight: 500;
}

.service-editor-modal .form-control-custom:focus {
    border-color: #20c997;
    box-shadow: 0 0 0 4px rgba(32, 201, 151, 0.1);
    background: #ffffff;
    outline: none;
}

.service-editor-modal .form-control-custom::placeholder {
    color: #a0aec0;
    font-style: italic;
    font-weight: 400;
}

.service-editor-modal .form-control-custom:disabled {
    background: #f7fafc;
    cursor: not-allowed;
    color: #718096;
    border-color: #e2e8f0;
}

.service-editor-modal .textarea-custom {
    resize: vertical;
    min-height: 110px;
    font-family: inherit;
}

.service-editor-modal .form-row-custom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.service-editor-modal .form-check-custom {
    display: flex;
    align-items: center;
    padding: 1.1rem 1.25rem;
    background: #ffffff;
    border-radius: 10px;
    transition: all 0.25s ease;
    border: 2px solid #e2e8f0;
    cursor: pointer;
}

.service-editor-modal .form-check-custom:hover {
    background: #f8f9fa;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.service-editor-modal .form-check-input-custom {
    width: 22px;
    height: 22px;
    margin-right: 0;
    cursor: pointer;
    border-radius: 6px;
    border: 2px solid #cbd5e0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.service-editor-modal .form-check-input-custom:checked {
    background-color: #20c997;
    border-color: #20c997;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.service-editor-modal .form-check-input-custom:focus {
    box-shadow: 0 0 0 4px rgba(32, 201, 151, 0.1);
    outline: none;
}

.service-editor-modal .form-check-input-custom:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.service-editor-modal .form-check-label-custom {
    margin-left: 0.85rem;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    user-select: none;
    flex: 1;
    font-size: 0.95rem;
}

.service-editor-modal .form-check-label-custom i {
    margin-right: 0.5rem;
    color: #20c997;
    font-size: 1.1rem;
}

.service-editor-modal .validation-message-custom {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.service-editor-modal .validation-message-custom::before {
    content: '⚠';
    font-size: 1rem;
}

@media (max-width: 768px) {
    .service-editor-modal .form-row-custom {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .service-editor-modal .form-group-custom {
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 480px) {
    .service-editor-modal .modal-body-custom {
        padding: 1rem;
    }

    .service-editor-modal .form-control-custom {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .service-editor-modal .form-check-custom {
        padding: 0.9rem 1rem;
    }
}

/* ==================== Operator Editor Modal Forms (OperatorsPresentation/Components/OperatorEditorModal) ==================== */
.operator-editor-modal .form-container {
    width: 100%;
}

.operator-editor-modal .form-group {
    margin-bottom: 1.5rem;
}

.operator-editor-modal .form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

.operator-editor-modal .form-control,
.operator-editor-modal .form-select {
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.operator-editor-modal .form-control:focus,
.operator-editor-modal .form-select:focus {
    border-color: #20c997 !important;
    box-shadow: 0 0 0 0.2rem rgba(32, 201, 151, 0.25) !important;
    outline: 0;
}

.operator-editor-modal .form-control::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

.operator-editor-modal .form-check-input {
    width: 2rem;
    height: 1rem;
    margin-top: 0.25rem;
    background-color: #e9ecef;
    border: 2px solid #dee2e6;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.operator-editor-modal .form-check-input:checked {
    background-color: #20c997 !important;
    border-color: #20c997 !important;
}

.operator-editor-modal .form-check-label {
    margin-left: 0.5rem;
    color: #495057;
    font-weight: 500;
}

@media (max-width: 768px) {
    .operator-editor-modal .modal-header,
    .operator-editor-modal .modal-body,
    .operator-editor-modal .modal-footer {
        padding: 1rem 1.5rem;
    }
}

/* ==================== Business Hour Modal Forms (BusinessHoursPresentation/Components/BusinessHourModal) ==================== */
.business-hour-modal .form-field {
    margin-bottom: 1.25rem;
}

.business-hour-modal .form-field:last-child {
    margin-bottom: 0;
}

.business-hour-modal .form-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.business-hour-modal .form-field input,
.business-hour-modal .form-field select,
.business-hour-modal .form-field textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.2s;
}

.business-hour-modal .form-field input:focus,
.business-hour-modal .form-field select:focus,
.business-hour-modal .form-field textarea:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.business-hour-modal .form-field input:disabled,
.business-hour-modal .form-field select:disabled,
.business-hour-modal .form-field textarea:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.business-hour-modal .form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.business-hour-modal .time-range-field {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.business-hour-modal .half-width {
    flex: 1;
    margin-bottom: 0;
}

/* Toggle Field */
.business-hour-modal .toggle-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.business-hour-modal .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.business-hour-modal .toggle-label input[type="checkbox"] {
    display: none;
}

.business-hour-modal .toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #dee2e6;
    border-radius: 12px;
    transition: all 0.3s;
}

.business-hour-modal .toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.business-hour-modal .toggle-label input[type="checkbox"]:checked + .toggle-switch {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.business-hour-modal .toggle-label input[type="checkbox"]:checked + .toggle-switch::before {
    transform: translateX(20px);
}

.business-hour-modal .premium-info {
    font-size: 0.8rem;
    color: #ffc107;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-left: 52px;
}

.business-hour-modal .premium-info i {
    color: #ffc107;
}

@media (max-width: 576px) {
    .business-hour-modal .time-range-field {
        flex-direction: column;
        gap: 0;
    }

    .business-hour-modal .half-width {
        margin-bottom: 1.25rem;
    }

    .business-hour-modal .premium-info {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* ==================== Operator Schedule Modal Forms (OperatorsPresentation/Components/OperatorScheduleModal) ==================== */
.operator-schedule-modal .form-field {
    margin-bottom: 1.5rem;
}

.operator-schedule-modal .form-field:last-child {
    margin-bottom: 0;
}

.operator-schedule-modal .form-field label,
.operator-schedule-modal .form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.operator-schedule-modal .form-field select,
.operator-schedule-modal .form-field input[type="time"],
.operator-schedule-modal .form-field input[type="date"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.operator-schedule-modal .form-field select:focus,
.operator-schedule-modal .form-field input:focus {
    border-color: #20c997;
    box-shadow: 0 0 0 3px rgba(32, 201, 151, 0.1);
    outline: none;
}

.operator-schedule-modal .form-field select:disabled,
.operator-schedule-modal .form-field input:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.operator-schedule-modal .time-range-field {
    display: flex;
    gap: 1rem;
}

.operator-schedule-modal .half-width {
    flex: 1;
}

.operator-schedule-modal .date-unavailable {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

/* Toggle Field */
.operator-schedule-modal .toggle-field {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.operator-schedule-modal .toggle-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.operator-schedule-modal .toggle-label input[type="checkbox"] {
    display: none;
}

.operator-schedule-modal .toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: #dee2e6;
    border-radius: 15px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.operator-schedule-modal .toggle-switch::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.operator-schedule-modal .toggle-label input[type="checkbox"]:checked + .toggle-switch {
    background: #20c997;
}

.operator-schedule-modal .toggle-label input[type="checkbox"]:checked + .toggle-switch::before {
    transform: translateX(24px);
}

.operator-schedule-modal .toggle-label input[type="checkbox"]:disabled + .toggle-switch {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .operator-schedule-modal .time-range-field {
        flex-direction: column;
        gap: 1rem;
    }

    .operator-schedule-modal .toggle-label {
        font-size: 0.8rem;
    }
}

/* ==================== Appointment Modal Forms (SchedulerComponets/Components/AppointmentModal) ==================== */
.appointment-modal .form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.appointment-modal .form-row .form-field {
    flex: 1;
    margin-bottom: 0;
}

.appointment-modal .form-field {
    margin-bottom: 16px;
}

.appointment-modal .form-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.appointment-modal .form-field input,
.appointment-modal .form-field select,
.appointment-modal .form-field textarea {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
    background-color: white;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.appointment-modal .form-field input:focus,
.appointment-modal .form-field select:focus,
.appointment-modal .form-field textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.appointment-modal .form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.appointment-modal .duration-field {
    position: relative;
}

.appointment-modal .duration-field input {
    padding-right: 60px;
}

.appointment-modal .duration-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 0.9rem;
    pointer-events: none;
}

.appointment-modal .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s;
    background: white;
}

.appointment-modal .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.appointment-modal .form-control.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.appointment-modal .form-control.textarea {
    min-height: 80px;
    resize: vertical;
}

/* Staff Selector */
.appointment-modal .staff-selector select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

@media (max-width: 768px) {
    .appointment-modal .form-row {
        flex-direction: column;
        gap: 12px;
    }
}

/* ==================== Profile Image Upload Forms (UsersPresentation/Components/ProfileImageUpload) ==================== */
.profile-image-upload .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-image-upload .profile-upload-mud {
    width: 100%;
    margin-bottom: 1rem;
}

.profile-image-upload .profile-upload-mud .mud-paper {
    transition: all 0.3s ease;
}

.profile-image-upload .profile-upload-mud .mud-paper:hover {
    background-color: rgba(0, 123, 255, 0.04) !important;
    border-color: #007bff !important;
}

.profile-image-upload .gray-text {
    color: #6c757d !important;
}

/* ==================== Image Upload Modal Forms (ImagesPresentation/Components/ImageUploadModal) ==================== */
.image-upload-modal .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-upload-modal .file-upload-mud {
    width: 100%;
}

.image-upload-modal .file-upload-mud .mud-paper {
    transition: all 0.3s ease;
}

.image-upload-modal .file-upload-mud .mud-paper:hover {
    background-color: rgba(32, 201, 151, 0.04) !important;
    border-color: #20c997 !important;
}

.image-upload-modal .gray-text {
    color: #6c757d !important;
}

/* ==================== Product Editor Modal Forms (ProductsPresentation/Components/ProductEditorModal) ==================== */
.product-editor-modal .form-section {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-editor-modal .section-title {
    margin: 0 0 1.5rem 0;
    color: #2d3748;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f7fafc;
}

.product-editor-modal .section-title i {
    margin-right: 0.75rem;
    color: #4299e1;
    font-size: 1.2rem;
}

.product-editor-modal .form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.product-editor-modal .form-control {
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.product-editor-modal .form-control:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    background: #ffffff;
}

.product-editor-modal .form-control::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.product-editor-modal textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.product-editor-modal .form-text {
    font-size: 0.85rem;
    margin-top: 0.375rem;
}

@media (max-width: 768px) {
    .product-editor-modal .editor-content {
        padding: 1rem;
    }
}

/* ==================== Common Form Utilities ==================== */
.field-validation-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.input-validation-error {
    border-color: #dc3545;
}

.validation-message {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 0.375rem;
    font-weight: 500;
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
}

/* Spinner */
.spinner-border {
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
    margin-right: 0.5rem;
    display: inline-block;
    vertical-align: text-bottom;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Focus States */
.btn:focus,
.form-control:focus {
    outline: none;
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}
