/**
 * AeroCore B2B Inquiry Cart (Inquiry List) Stylesheet
 */

/* Floating Actions Wrapper */
.scy-floating-actions-wrapper {
    position: fixed !important;
    right: 24px !important;
    bottom: 24px !important;
    z-index: 9990 !important;
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 16px !important;
    align-items: flex-end !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    pointer-events: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.scy-floating-actions-wrapper > * {
    pointer-events: auto !important;
}

/* Base Toggle/Button Unification */
.scy-cart-toggle,
.scy-sticky-contact-btn,
.back-to-top,
.scy-floating-actions-wrapper .back-to-top {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: var(--theme-color, #2458a6) !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.3s ease, 
                width 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-radius 0.4s, 
                background 0.2s, 
                color 0.2s,
                opacity 0.3s,
                visibility 0.3s !important;
    position: relative !important;
    outline: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.scy-cart-toggle:hover,
.scy-sticky-contact-btn:hover,
.back-to-top:hover,
.scy-floating-actions-wrapper .back-to-top:hover {
    background: var(--theme-color, #2458a6) !important;
    color: #ffffff !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18) !important;
}

.scy-cart-toggle:active,
.scy-sticky-contact-btn:active,
.back-to-top:active,
.scy-floating-actions-wrapper .back-to-top:active {
    transform: scale(0.95) !important;
}

/* Specific Contact Button styling for slide-out text */
.scy-sticky-contact-btn {
    border-radius: 24px !important; /* using 24px instead of 50% so it becomes a capsule when expanding */
    overflow: hidden !important;
    width: 48px !important;
}

.scy-sticky-contact-btn svg {
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.scy-sticky-contact-btn span {
    display: inline-block !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    width: 0 !important;
    margin-left: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    transition: opacity 0.3s ease, width 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.4s !important;
}

.scy-sticky-contact-btn:hover {
    width: 140px !important;
    border-radius: 24px !important;
    transform: translateY(-2px) !important; /* overrides standard hover scale to avoid visual glitch during expansion */
}

.scy-sticky-contact-btn:hover span {
    opacity: 1 !important;
    width: auto !important;
    margin-left: 8px !important;
}

/* Specific Back-to-top styling overrides */
.back-to-top,
.scy-floating-actions-wrapper .back-to-top {
    /* Reset position styles from main.less/main.min.css */
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .scy-floating-actions-wrapper {
        right: 16px !important;
        bottom: 16px !important;
        gap: 12px !important;
    }
    
    body.has-mobile-bottom-bar .scy-floating-actions-wrapper {
        bottom: 72px !important;
    }

    .scy-cart-toggle,
    .scy-sticky-contact-btn,
    .back-to-top,
    .scy-floating-actions-wrapper .back-to-top {
        width: 40px !important;
        height: 40px !important;
    }

    .scy-sticky-contact-btn {
        border-radius: 20px !important;
    }

    .scy-sticky-contact-btn:hover {
        width: 40px !important;
        transform: none !important;
    }

    .scy-sticky-contact-btn span {
        display: none !important;
    }

    .scy-cart-toggle:hover,
    .back-to-top:hover,
    .scy-floating-actions-wrapper .back-to-top:hover {
        transform: none !important;
    }
}

.scy-cart-toggle svg {
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.3s ease;
}

/* Counter Badge */
.scy-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4d4f;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.5);
    transform: scale(0);
}

.scy-cart-count.has-items {
    transform: scale(1);
}

.scy-cart-count.bump {
    transform: scale(1.3);
}

/* Cart Panel Drawer */
.scy-cart-panel {
    position: fixed;
    right: -400px;
    top: 0;
    bottom: 0;
    width: 380px;
    max-width: 90vw;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 9995;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid rgba(225, 232, 245, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.scy-cart-panel.is-open {
    right: 0;
}

/* Panel Header */
.scy-cart-header {
    padding: 24px 20px;
    border-bottom: 1px solid #edf2fc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.scy-cart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a2c4c;
}

.scy-cart-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #8c9ba5;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.scy-cart-close:hover {
    color: #2458a6;
    transform: rotate(90deg);
}

/* Panel Content list */
.scy-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Cart item */
.scy-cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #edf2fc;
    margin-bottom: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scy-cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 47, 86, 0.05);
}

.scy-cart-item-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #ffffff;
    border: 1px solid #eef3fc;
}

.scy-cart-item-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #eef3fc;
    color: #4d679d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
}

.scy-cart-item-info {
    flex: 1;
    min-width: 0;
}

.scy-cart-item-title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 600;
    color: #2e3a59;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scy-cart-item-remove {
    background: transparent;
    border: none;
    color: #ff4d4f;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.2s ease;
    opacity: 0.8;
}

.scy-cart-item-remove:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Empty State */
.scy-cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #8f9bb3;
}

.scy-cart-empty svg {
    margin-bottom: 12px;
    opacity: 0.4;
    color: #2458a6;
}

.scy-cart-empty p {
    margin: 0;
    font-size: 14px;
}

/* Panel Footer */
.scy-cart-footer {
    padding: 20px;
    border-top: 1px solid #edf2fc;
    background: #ffffff;
}

/* Forms styling inside cart */
.scy-cart-inquiry-form-wrap {
    animation: fadeIn 0.3s ease;
}

.scy-cart-form-grid {
    display: grid;
    gap: 12px;
}

.scy-cart-form-grid label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: #4d5b76;
    font-weight: 600;
}

.scy-cart-form-grid input,
.scy-cart-form-grid textarea {
    width: 100%;
    border: 1px solid #dfe6f2;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px 12px;
    font-size: 13px;
    color: #1a2c4c;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.scy-cart-form-grid input:focus,
.scy-cart-form-grid textarea:focus {
    border-color: #4a7fd6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(74, 127, 214, 0.12);
}

.scy-cart-form-grid .scy-form-full {
    grid-column: 1 / -1;
}

/* Success Alert Styling */
.scy-form-notice {
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.scy-form-notice--success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

.scy-form-notice--error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

/* Toast Message */
.scy-cart-toast {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: rgba(36, 88, 166, 0.95);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.scy-cart-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* responsive */
@media (max-width: 480px) {
    .scy-cart-panel {
        width: 100%;
        max-width: 100vw;
        right: -100vw;
    }
}

/* Flyer Animation Element */
.scy-cart-flyer {
    position: fixed;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #2458a6;
    box-shadow: 0 4px 10px rgba(36, 88, 166, 0.4);
    z-index: 10000;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.6s ease;
}

/* Bump Animation for Cart Toggle */
@keyframes scyCartBump {
    0% { transform: scale(1); }
    30% { transform: scale(1.2) rotate(-10deg); }
    50% { transform: scale(0.9) rotate(10deg); }
    70% { transform: scale(1.1) rotate(-5deg); }
    100% { transform: scale(1) rotate(0); }
}

.scy-cart-toggle.bump-widget {
    animation: scyCartBump 0.4s ease-out;
}
