/**
 * AC Valve Alliance - Enquiry System Styles
 *
 * @package AC_Valve_Alliance
 * @version 1.0.0
 */

/* ==========================================================================
   HEADER ENQUIRY ICON
   ========================================================================== */

.header-enquiry {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.enquiry-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ffffff;
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

.enquiry-toggle:hover {
    color: var(--acvalve-primary-color);
}

.enquiry-count {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background-color: #e74c3c;
    border-radius: 50%;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
}


/* ==========================================================================
   ENQUIRY DRAWER
   ========================================================================== */

.acv-enquiry-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.acv-enquiry-drawer.is-visible {
    transform: translateY(0);
}

.acv-enquiry-drawer .acv-enquiry-drawer-body {
    max-height: 500px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease, border-width 0.35s ease;
}

.acv-enquiry-drawer.is-collapsed .acv-enquiry-drawer-body {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-width: 0;
}

.acv-enquiry-drawer .acv-enquiry-drawer-toggle i {
    transition: transform 0.3s ease;
}

.acv-enquiry-drawer.is-collapsed .acv-enquiry-drawer-toggle i {
    transform: rotate(180deg);
}


/* Drawer Header */
.acv-enquiry-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 30px;
    background-color: #0f3950;
    color: #ffffff;
}

.acv-enquiry-drawer-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.acv-enquiry-drawer-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    color: #14394f;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.acv-enquiry-drawer-toggle:hover {
    opacity: 0.8;
}

.acv-enquiry-drawer-toggle i {
    transition: transform 0.3s ease;
}

.acv-enquiry-drawer-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    color: #ffffff;
}

.acv-enquiry-drawer-title span {
    margin-left: 8px;
    font-weight: 400;
    font-size: 0.85em;
    opacity: 0.8;
    color: #ffffff;
}


/* Drawer Body */
.acv-enquiry-drawer-body {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 30px;
    background-color: #f5f7f9;
    border-top: 1px solid #dedede;
}

.acv-enquiry-drawer-carousel {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}


/* Carousel Navigation */
.acv-enquiry-nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #0f3950;
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.acv-enquiry-nav:hover {
    background-color: #1a5270;
    transform: scale(1.05);
}

.acv-enquiry-nav:active {
    transform: scale(0.95);
}


/* Products Grid (horizontal scroll) */
.acv-enquiry-products {
    flex: 1;
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 5px;
    margin: -5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.acv-enquiry-products::-webkit-scrollbar {
    display: none;
}


/* Product Card */
.acv-enquiry-card {
    position: relative;
    flex-shrink: 0;
    width: 295px;
    background: transparent;
    border: none;
    border-right: 2px solid #14394f;
    border-radius: 0;
    overflow: visible;
    padding-right: 20px;
    transition: none;
}

.acv-enquiry-card:last-child {
    border-right: none;
    padding-right: 0;
}

.acv-enquiry-card:hover {
    box-shadow: none;
    transform: none;
}

.acv-enquiry-card-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.acv-enquiry-card-image {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: transparent;
    overflow: hidden;
}

.acv-enquiry-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.acv-enquiry-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ccc;
    font-size: 2rem;
}

.acv-enquiry-card-info {
    flex: 1;
    min-width: 0;
    padding: 0;
    text-align: left;
}

.acv-enquiry-card-manufacturer {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f3950;
    margin-bottom: 4px;
}

.acv-enquiry-card-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.3;
    color: #0f3950;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


/* Remove Button */
.acv-enquiry-remove {
    position: absolute;
    top: 0;
    left: 155px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #0f3950;
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 0.6rem;
    cursor: pointer;
    opacity: 1;
    transition: background-color 0.2s ease;
    z-index: 2;
}

.acv-enquiry-card:hover .acv-enquiry-remove {
    opacity: 1;
}

.acv-enquiry-remove:hover {
    background: #e74c3c;
}


/* Drawer Actions */
.acv-enquiry-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.acv-enquiry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 2rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.acv-enquiry-btn-primary {
    background-color: var(--acv-btn-primary-bg, #ee7f2d);
    color: #ffffff;
}

.acv-enquiry-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #d96f1f;
}

.acv-enquiry-btn-secondary {
    background-color: #00bac6;
    color: #ffffff;
}

.acv-enquiry-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #009aa5;
}


/* ==========================================================================
   ADD TO ENQUIRY BUTTON (in product header)
   ========================================================================== */

/* Added state for the primary button */
.acv-lpph-btn-primary.add-to-enquiry.is-added {
    background-color: #27ae60;
    border-color: #27ae60;
    color: #ffffff;
    cursor: default;
}

.acv-lpph-btn-primary.add-to-enquiry.is-added:hover,
.acv-lpph-btn-primary.add-to-enquiry.is-added:focus {
    background-color: #27ae60;
    border-color: #27ae60;
    transform: none;
    box-shadow: none;
}

.acv-lpph-btn-primary.add-to-enquiry.just-added {
    animation: pulse-green 0.4s ease;
}

@keyframes pulse-green {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.add-to-enquiry i {
    margin-right: 8px;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1200px) {
    .acv-enquiry-drawer-header,
    .acv-enquiry-drawer-body {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 992px) {
    .acv-enquiry-drawer-body {
        flex-wrap: wrap;
    }

    .acv-enquiry-drawer-carousel {
        width: 100%;
        order: 2;
    }

    .acv-enquiry-drawer-actions {
        flex-direction: row;
        width: 100%;
        order: 1;
        margin-bottom: 15px;
    }

    .acv-enquiry-btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .acv-enquiry-drawer-header {
        padding: 10px 15px;
    }

    .acv-enquiry-drawer-body {
        padding: 15px;
    }

    .acv-enquiry-card {
        width: 180px;
        padding-right: 15px;
    }

    .acv-enquiry-card-image {
        width: 80px;
        height: 80px;
    }
    
    .acv-enquiry-card-link {
        gap: 10px;
    }

    .acv-enquiry-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .acv-enquiry-nav {
        width: 32px;
        height: 32px;
    }
    
    .acv-enquiry-remove {
        left: 65px;
    }
}

@media (max-width: 480px) {
    .header-enquiry {
        margin-right: 10px;
    }

    .enquiry-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .enquiry-count {
        min-width: 16px;
        height: 16px;
        font-size: 0.65rem;
    }

    .acv-enquiry-drawer-actions {
        flex-direction: column;
    }

    .acv-enquiry-nav {
        display: none;
    }
}
