/**
 * Add to Cart Modal Styles
 * 
 * Modern, responsive modal for service checkout
 * Supports both dark and light themes
 * 
 * Used in: Service Types 1-6 (not type 7)
 */

/* ========================================
   MODAL DIALOG
   ======================================== */

.atc-modal-dialog {
    max-width: 520px !important;
    margin: 1.75rem auto !important;
}

@media (min-width: 768px) {
    .atc-modal-dialog {
        max-width: 580px !important;
    }
}

@media (min-width: 992px) {
    .atc-modal-dialog {
        max-width: 620px !important;
    }
}

/* ========================================
   MODAL CONTAINER
   ======================================== */

.atc-modal {
    background: linear-gradient(135deg, #1a1d29 0%, #232838 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    color: #e8eaed;
}

/* ========================================
   MODAL HEADER
   ======================================== */

.atc-modal-header {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.atc-modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.atc-modal-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #2563a8 0%, #3b82f6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 6px 16px rgba(37, 99, 168, 0.35);
    flex-shrink: 0;
}

.atc-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-1);
    margin: 0;
    line-height: 1.3;
}

.atc-modal-close {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-2);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.atc-modal-close:hover {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.3);
    color: #ff3b30;
    transform: scale(1.05);
}

/* ========================================
   MODAL BODY
   ======================================== */

.atc-modal-body {
    padding: 1.25rem 1.5rem;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.atc-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Section Styles - Clean, no nested boxes */
.atc-section {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.atc-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.atc-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-2);
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.atc-section-header i {
    color: #3b82f6;
    font-size: 0.85rem;
}

/* ========================================
   ORDER SUMMARY SECTION
   ======================================== */

.atc-service-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-1);
    margin-bottom: 0.75rem;
}

.atc-selected-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.atc-selected-options .badge,
.atc-selected-options span {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.atc-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0.5rem;
}

.atc-price-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-2);
}

.atc-price-label i {
    color: var(--highlight-green);
}

.atc-price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--highlight-green);
}

.atc-change-order-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: none;
    color: #3b82f6;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.4rem 0;
    transition: all 0.2s ease;
}

.atc-change-order-btn:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* ========================================
   ACCOUNT DETAILS SECTION
   ======================================== */

.atc-options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

@media (min-width: 576px) {
    .atc-options-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.atc-option-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.atc-option-wrapper.atc-option-full {
    grid-column: 1 / -1;
}

.atc-option-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-2);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Input Styles */
.atc-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--color-text-1);
    transition: all 0.2s ease;
}

.atc-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.atc-input::placeholder {
    color: var(--color-text-3);
    opacity: 0.7;
}

/* Select Styles */
.atc-select-wrapper {
    position: relative;
}

.atc-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--color-text-1);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.atc-select:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.atc-select option {
    background: #1a1d29;
    color: #e8eaed;
    padding: 0.5rem;
}

.atc-select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #3b82f6;
    font-size: 0.75rem;
    pointer-events: none;
}

/* Checkbox Styles */
.atc-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.atc-checkbox-wrapper:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.atc-checkbox-wrapper.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.atc-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0;
    position: absolute;
}

.atc-checkbox-label {
    flex: 1;
    font-size: 0.9rem;
    color: var(--color-text-1);
    cursor: pointer;
    margin: 0;
}

.atc-checkbox-icon {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s ease;
}

.atc-checkbox-wrapper.selected .atc-checkbox-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563a8 100%);
    border-color: #3b82f6;
    color: white;
}

/* ========================================
   ADDITIONAL INFO SECTION
   ======================================== */

.atc-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    color: var(--color-text-1);
    resize: vertical;
    min-height: 80px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.atc-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.atc-textarea::placeholder {
    color: var(--color-text-3);
    opacity: 0.7;
}

/* ========================================
   TERMS SECTION
   ======================================== */

.atc-terms-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

.atc-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.atc-checkbox-simple {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
    flex-shrink: 0;
}

.atc-terms-label,
.atc-newsletter-label {
    font-size: 0.85rem;
    color: var(--color-text-2);
    cursor: pointer;
    margin: 0;
    line-height: 1.4;
}

.atc-terms-label a {
    color: #3b82f6;
    text-decoration: underline;
}

.atc-terms-label a:hover {
    color: #60a5fa;
}

/* ========================================
   MODAL FOOTER
   ======================================== */

.atc-modal-footer {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 0.85rem;
    justify-content: flex-end;
}

.atc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.atc-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-2);
}

.atc-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-text-1);
}

.atc-btn-confirm {
    background: linear-gradient(135deg, #2563a8 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 6px 16px rgba(37, 99, 168, 0.35);
}

.atc-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 168, 0.45);
}

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

/* ========================================
   LIGHT THEME
   ======================================== */

html[data-theme="light"] .atc-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
    color: #1a1f27;
}

html[data-theme="light"] .atc-modal-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .atc-modal-title {
    color: #1a1f27;
}

html[data-theme="light"] .atc-modal-close {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #6b7280;
}

html[data-theme="light"] .atc-modal-close:hover {
    background: rgba(255, 59, 48, 0.08);
    border-color: rgba(255, 59, 48, 0.2);
    color: #dc2626;
}

html[data-theme="light"] .atc-section {
    background: transparent;
    border-color: transparent;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .atc-section-header {
    color: #6b7280;
}

html[data-theme="light"] .atc-service-name {
    color: #1a1f27;
}

html[data-theme="light"] .atc-selected-options .badge,
html[data-theme="light"] .atc-selected-options span {
    background: linear-gradient(135deg, #2563a8 0%, #3b82f6 100%);
    border-color: rgba(37, 99, 168, 0.3);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .atc-price-row {
    border-top-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .atc-price-label {
    color: #6b7280;
}

html[data-theme="light"] .atc-option-label {
    color: #6b7280;
}

html[data-theme="light"] .atc-input,
html[data-theme="light"] .atc-select,
html[data-theme="light"] .atc-textarea {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1a1f27;
}

html[data-theme="light"] .atc-input:focus,
html[data-theme="light"] .atc-select:focus,
html[data-theme="light"] .atc-textarea:focus {
    background: rgba(0, 0, 0, 0.05);
    border-color: #2563a8;
    box-shadow: 0 0 0 4px rgba(37, 99, 168, 0.1);
}

html[data-theme="light"] .atc-select option {
    background: #ffffff;
    color: #1a1f27;
}

html[data-theme="light"] .atc-select-arrow {
    color: #2563a8;
}

html[data-theme="light"] .atc-checkbox-wrapper {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .atc-checkbox-wrapper:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .atc-checkbox-wrapper.selected {
    background: rgba(37, 99, 168, 0.06);
    border-color: rgba(37, 99, 168, 0.25);
}

html[data-theme="light"] .atc-checkbox-label {
    color: #1a1f27;
}

html[data-theme="light"] .atc-checkbox-icon {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .atc-terms-label,
html[data-theme="light"] .atc-newsletter-label {
    color: #6b7280;
}

html[data-theme="light"] .atc-terms-label a {
    color: #2563a8;
}

html[data-theme="light"] .atc-terms-label a:hover {
    color: #1d4ed8;
}

html[data-theme="light"] .atc-modal-footer {
    background: rgba(0, 0, 0, 0.02);
    border-top-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .atc-btn-cancel {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: #6b7280;
}

html[data-theme="light"] .atc-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.18);
    color: #1a1f27;
}

html[data-theme="light"] .atc-change-order-btn {
    color: #2563a8;
}

html[data-theme="light"] .atc-change-order-btn:hover {
    color: #1d4ed8;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 575.98px) {
    .atc-modal-dialog {
        max-width: calc(100vw - 1.5rem) !important;
        margin: 0.75rem !important;
    }
    
    .atc-modal {
        border-radius: 12px;
    }
    
    .atc-modal-header,
    .atc-modal-body,
    .atc-modal-footer {
        padding: 1rem;
    }
    
    .atc-modal-title {
        font-size: 1.1rem;
    }
    
    .atc-modal-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .atc-modal-close {
        width: 34px;
        height: 34px;
    }
    
    .atc-section {
        padding: 0.85rem 1rem;
    }
    
    .atc-options-container {
        grid-template-columns: 1fr;
    }
    
    .atc-modal-footer {
        flex-direction: column;
    }
    
    .atc-btn {
        width: 100%;
        justify-content: center;
    }
    
    .atc-price-value {
        font-size: 1.35rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .atc-modal-dialog {
        max-width: calc(100vw - 2rem) !important;
        margin: 1rem !important;
    }
}

