/**
 * Quick Order to Telegram - Aroma Air Style
 * Design System: Luxury Minimal
 */

/* ══════════════════════════════════════════════════════════════════════════
   CSS VARIABLES (Aroma Air Design Tokens)
   ══════════════════════════════════════════════════════════════════════════ */

.qot-popup {
    --qot-blue: #1E64F3;
    --qot-blue-hover: #1854D0;
    --qot-blue-glow: rgba(30, 100, 243, 0.2);
    --qot-blue-subtle: rgba(30, 100, 243, 0.08);
    --qot-black: #0A0A0A;
    --qot-white: #FFFFFF;
    --qot-gray-50: #FAFAFA;
    --qot-gray-100: #F5F5F5;
    --qot-gray-200: #E5E5E5;
    --qot-gray-400: #999999;
    --qot-gray-600: #666666;
    --qot-success: #10B981;
    --qot-error: #EF4444;
    
    --qot-font-display: 'Cormorant Garamond', Georgia, serif;
    --qot-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --qot-radius-sm: 4px;
    --qot-radius-md: 8px;
    --qot-radius-lg: 16px;
    --qot-radius-xl: 24px;
    
    --qot-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --qot-ease-out: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ══════════════════════════════════════════════════════════════════════════
   POPUP CONTAINER
   ══════════════════════════════════════════════════════════════════════════ */

.qot-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: var(--qot-font-body);
    -webkit-font-smoothing: antialiased;
    animation: qotFadeIn 0.3s var(--qot-ease);
}

.qot-popup * {
    box-sizing: border-box;
}

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

/* Overlay */
.qot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ══════════════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════════════════ */

.qot-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--qot-white);
    border-radius: var(--qot-radius-xl);
    max-width: 440px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 40px);
    overflow: hidden;
    box-shadow: 
        0 24px 80px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: qotSlideUp 0.5s var(--qot-ease-out);
}

@keyframes qotSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.qot-modal-content {
    padding: 40px 32px 32px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* ══════════════════════════════════════════════════════════════════════════
   CLOSE BUTTON
   ══════════════════════════════════════════════════════════════════════════ */

.qot-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: var(--qot-gray-50);
    border: 1px solid var(--qot-gray-100);
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.3s var(--qot-ease);
    z-index: 10;
    padding: 0;
}

.qot-close svg {
    width: 18px;
    height: 18px;
    color: var(--qot-gray-600);
    transition: color 0.3s var(--qot-ease);
}

.qot-close:hover {
    background: var(--qot-black);
    border-color: var(--qot-black);
}

.qot-close:hover svg {
    color: var(--qot-white);
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════════════════ */

.qot-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.qot-modal-eyebrow {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--qot-blue);
    margin-bottom: 8px;
}

.qot-modal-title {
    font-family: var(--qot-font-display);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--qot-black);
    margin: 0;
    line-height: 1.2;
}

/* ══════════════════════════════════════════════════════════════════════════
   PRODUCT INFO
   ══════════════════════════════════════════════════════════════════════════ */

.qot-product-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--qot-gray-50);
    border: 1px solid var(--qot-gray-100);
    border-radius: var(--qot-radius-lg);
    margin-bottom: 24px;
}

.qot-product-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--qot-radius-md);
    flex-shrink: 0;
    background: var(--qot-gray-100);
}

.qot-product-details {
    flex: 1;
    min-width: 0;
}

.qot-product-name {
    font-family: var(--qot-font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--qot-black);
    margin: 0 0 4px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.qot-product-price {
    font-family: var(--qot-font-display);
    font-size: 20px;
    font-weight: 500;
    color: var(--qot-blue);
    margin: 0;
    line-height: 1;
}

/* ══════════════════════════════════════════════════════════════════════════
   FORM
   ══════════════════════════════════════════════════════════════════════════ */

.qot-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qot-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qot-form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--qot-black);
    letter-spacing: 0.01em;
}

.qot-form-group input[type="text"],
.qot-form-group input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--qot-white);
    border: 1px solid var(--qot-gray-200);
    border-radius: var(--qot-radius-md);
    font-family: var(--qot-font-body);
    font-size: 15px;
    color: var(--qot-black);
    transition: all 0.3s var(--qot-ease);
    outline: none;
}

.qot-form-group input::placeholder {
    color: var(--qot-gray-400);
}

.qot-form-group input:focus {
    border-color: var(--qot-blue);
    box-shadow: 0 0 0 3px var(--qot-blue-subtle);
}

/* Phone Input with Prefix */
.qot-phone-input {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--qot-gray-200);
    border-radius: var(--qot-radius-md);
    overflow: hidden;
    transition: all 0.3s var(--qot-ease);
}

.qot-phone-input:focus-within {
    border-color: var(--qot-blue);
    box-shadow: 0 0 0 3px var(--qot-blue-subtle);
}

.qot-phone-prefix {
    display: flex;
    align-items: center;
    padding: 14px 12px 14px 16px;
    background: var(--qot-gray-50);
    font-size: 15px;
    font-weight: 500;
    color: var(--qot-gray-600);
    border-right: 1px solid var(--qot-gray-200);
    user-select: none;
}

.qot-phone-input input {
    flex: 1;
    padding: 14px 16px;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--qot-white) !important;
}

.qot-phone-input input:focus {
    box-shadow: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   SUBMIT BUTTON
   ══════════════════════════════════════════════════════════════════════════ */

.qot-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: var(--qot-blue);
    color: var(--qot-white);
    border: none;
    border-radius: var(--qot-radius-md);
    font-family: var(--qot-font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s var(--qot-ease);
    position: relative;
    overflow: hidden;
    margin-top: 4px;
}

.qot-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s var(--qot-ease);
}

.qot-submit-btn:hover {
    background: var(--qot-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--qot-blue-glow);
}

.qot-submit-btn:hover::before {
    left: 100%;
}

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

.qot-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.qot-submit-btn:disabled:hover {
    box-shadow: none;
}

.qot-btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qot-btn-text svg {
    width: 18px;
    height: 18px;
}

/* Loader */
.qot-btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qot-spinner {
    width: 22px;
    height: 22px;
    animation: qotRotate 1.2s linear infinite;
}

.qot-spinner-path {
    stroke: var(--qot-white);
    stroke-linecap: round;
    animation: qotDash 1.5s ease-in-out infinite;
}

@keyframes qotRotate {
    100% { transform: rotate(360deg); }
}

@keyframes qotDash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   FORM NOTE
   ══════════════════════════════════════════════════════════════════════════ */

.qot-form-note {
    text-align: center;
    font-size: 12px;
    color: var(--qot-gray-400);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   MESSAGE
   ══════════════════════════════════════════════════════════════════════════ */

.qot-message {
    padding: 14px 18px;
    border-radius: var(--qot-radius-md);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    animation: qotSlideUpSmall 0.3s var(--qot-ease);
}

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

.qot-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--qot-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.qot-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--qot-error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ══════════════════════════════════════════════════════════════════════════
   SHORTCODE BUTTON
   ══════════════════════════════════════════════════════════════════════════ */

.qot-button,
button.qot-button,
a.qot-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: #1E64F3;
    color: #FFFFFF !important;
    border: none;
    border-radius: 4px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    line-height: 1;
}

.qot-button:hover,
button.qot-button:hover,
a.qot-button:hover {
    background: #1854D0;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(30, 100, 243, 0.25);
    text-decoration: none !important;
}

.qot-button:active {
    transform: translateY(0);
}

/* Button Variants */
.qot-button--outline {
    background: transparent;
    color: #1E64F3 !important;
    border: 1px solid #E5E5E5;
}

.qot-button--outline:hover {
    background: transparent;
    border-color: #1E64F3;
    color: #1E64F3 !important;
    box-shadow: none;
}

.qot-button--dark {
    background: #0A0A0A;
}

.qot-button--dark:hover {
    background: #1E64F3;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .qot-modal {
        width: calc(100% - 24px);
        max-height: calc(100vh - 24px);
        border-radius: var(--qot-radius-lg);
    }

    .qot-modal-content {
        padding: 32px 20px 24px;
    }

    .qot-modal-title {
        font-size: 24px;
    }

    .qot-product-info {
        padding: 12px;
        gap: 12px;
    }

    .qot-product-image {
        width: 60px;
        height: 60px;
    }

    .qot-product-name {
        font-size: 14px;
    }

    .qot-product-price {
        font-size: 18px;
    }

    .qot-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
    }

    .qot-close svg {
        width: 16px;
        height: 16px;
    }

    .qot-form-group input,
    .qot-phone-input input {
        padding: 12px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .qot-phone-prefix {
        padding: 12px 10px 12px 14px;
    }

    .qot-submit-btn {
        padding: 14px 20px;
        font-size: 13px;
    }

    .qot-button {
        padding: 14px 24px;
        font-size: 11px;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ══════════════════════════════════════════════════════════════════════════ */

.qot-form-group input:focus-visible,
.qot-submit-btn:focus-visible,
.qot-close:focus-visible,
.qot-button:focus-visible {
    outline: 2px solid var(--qot-blue);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .qot-popup,
    .qot-modal,
    .qot-close,
    .qot-submit-btn,
    .qot-button,
    .qot-message {
        animation: none;
        transition: none;
    }
}
