/**
 * Sticky Quick Actions Sidebar & Inquiry Modal Styles
 * Matches reference mockup:
 * - Left-center fixed positioning
 * - Slow, smooth cubic-bezier slide hover effect
 * - Send Inquiry (matte black/charcoal), Catalogue (theme orange), WhatsApp (green)
 * - Pixel-perfect responsive modal with Contact Form 7
 *
 * @package Krishna_Overseas
 */

/* ==========================================================================
   1. FIXED FLOATING STICKY SIDEBAR (LEFT CENTER)
   ========================================================================== */
.krishna-sticky-bar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99998;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Collapsed state via Chevron Toggle */
.krishna-sticky-bar.is-collapsed {
    transform: translateY(-50%) translateX(-48px);
}

.krishna-sticky-bar.is-collapsed .krishna-sticky-toggle {
    transform: translateX(48px);
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.25);
}

.krishna-sticky-bar.is-collapsed .krishna-sticky-toggle i {
    transform: rotate(180deg);
}

/* Individual Tab Item */
.krishna-sticky-item {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    border: none;
    outline: none;
    border-radius: 0 10px 10px 0;
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    height: 48px;
    width: 48px; /* Default collapsed width showing icon only */
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    transition: width 0.48s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.25s ease,
                box-shadow 0.25s ease,
                transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
}

/* Hover / Active Expanded State */
.krishna-sticky-item:hover,
.krishna-sticky-item.is-expanded {
    box-shadow: 3px 6px 20px rgba(0, 0, 0, 0.24);
}

/* Specific item expanded widths */
.krishna-sticky-toggle:hover {
    width: 48px;
}

.krishna-sticky-inquiry:hover,
.krishna-sticky-inquiry.is-expanded {
    width: 165px;
}

.krishna-sticky-catalogue:hover,
.krishna-sticky-catalogue.is-expanded {
    width: 152px;
}

.krishna-sticky-whatsapp:hover,
.krishna-sticky-whatsapp.is-expanded {
    width: 158px;
}

/* Icon Box */
.krishna-sticky-icon {
    width: 48px;
    min-width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.krishna-sticky-item:hover .krishna-sticky-icon {
    transform: scale(1.06);
}

/* Chevron Icon specifics */
.krishna-sticky-toggle .krishna-sticky-icon {
    font-size: 15px;
}

.krishna-sticky-toggle i {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Sliding Label Text */
.krishna-sticky-label {
    display: inline-block;
    font-family: var(--krishna-font-primary, 'Montserrat', sans-serif);
    font-size: 14.5px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.2px;
    padding-left: 2px;
    padding-right: 18px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-14px);
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.06s,
                transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.06s;
}

.krishna-sticky-item:hover .krishna-sticky-label,
.krishna-sticky-item.is-expanded .krishna-sticky-label {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   2. ITEM COLOR THEMES (MATCHING REFERENCE IMAGE)
   ========================================================================== */
/* 1. Toggle Button: Solid Deep Black */
.krishna-sticky-toggle {
    background-color: #0b0f19;
}
.krishna-sticky-toggle:hover {
    background-color: #000000;
}

/* 2. Send Inquiry: Dark Charcoal / Matte Black */
.krishna-sticky-inquiry {
    background-color: #22252a;
}
.krishna-sticky-inquiry:hover,
.krishna-sticky-inquiry.is-expanded {
    background-color: #16181b;
}

/* 3. Catalogue: Theme Orange / Amber */
.krishna-sticky-catalogue {
    background-color: var(--krishna-primary, #ef7f1a);
}
.krishna-sticky-catalogue:hover,
.krishna-sticky-catalogue.is-expanded {
    background-color: #dc6f10;
}

/* 4. WhatsApp: Official WhatsApp Green */
.krishna-sticky-whatsapp {
    background-color: #25D366;
}
.krishna-sticky-whatsapp:hover,
.krishna-sticky-whatsapp.is-expanded {
    background-color: #20bd5a;
}

/* ==========================================================================
   3. SEND INQUIRY POPUP MODAL
   ========================================================================== */
.krishna-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.krishna-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Backdrop */
.krishna-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

/* Dialog Container */
.krishna-modal-dialog {
    position: relative;
    z-index: 2;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.krishna-modal-overlay.is-active .krishna-modal-dialog {
    transform: scale(1) translateY(0);
}

/* Card Inside Dialog */
.krishna-modal-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), 0 0 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/* Modal Header */
.krishna-modal-header {
    padding: 24px 32px 18px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    background: #ffffff;
    flex-shrink: 0;
}

.krishna-modal-tagline {
    display: inline-block;
    font-family: var(--krishna-font-primary, 'Montserrat', sans-serif);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--krishna-primary, #ef7f1a);
    margin-bottom: 4px;
}

.krishna-modal-title {
    font-family: var(--krishna-font-primary, 'Montserrat', sans-serif);
    font-size: 23px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 5px 0;
    line-height: 1.25;
}

.krishna-modal-sub {
    font-family: var(--krishna-font-primary, 'Montserrat', sans-serif);
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.krishna-modal-close {
    background: #f1f5f9;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s ease;
}

.krishna-modal-close:hover {
    background-color: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

/* Modal Body */
.krishna-modal-body {
    padding: 24px 32px 30px;
    overflow-y: auto;
    background: #f8fafc;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
}

/* Modal Custom Scrollbar */
.krishna-modal-body::-webkit-scrollbar {
    width: 6px;
}
.krishna-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.krishna-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.krishna-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Contact Form Container Inside Modal */
.krishna-modal-body .krishna-contact-form-card {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100%;
}

.krishna-modal-body .krishna-cf-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 16px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.krishna-modal-body .krishna-cf-field {
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
}

.krishna-modal-body .krishna-cf-field-full {
    grid-column: 1 / -1;
}

.krishna-modal-body .krishna-cf-field label {
    font-family: var(--krishna-font-primary, 'Montserrat', sans-serif);
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    display: block;
}

.krishna-modal-body .krishna-cf-input-wrap,
.krishna-modal-body .krishna-cf-select-wrap,
.krishna-modal-body .krishna-cf-textarea-wrap {
    position: relative;
    width: 100%;
    display: block;
}

.krishna-modal-body .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    position: static;
}

/* Form Controls Inside Modal */
.krishna-modal-body .krishna-cf-input,
.krishna-modal-body input[type="text"],
.krishna-modal-body input[type="email"],
.krishna-modal-body input[type="tel"] {
    width: 100%;
    height: 44px;
    background-color: #ffffff;
    border: 1.2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 38px 0 14px;
    font-family: var(--krishna-font-primary, 'Montserrat', sans-serif);
    font-size: 13.5px;
    color: #1e293b;
    box-sizing: border-box;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.krishna-modal-body input:focus,
.krishna-modal-body select:focus,
.krishna-modal-body textarea:focus {
    outline: none;
    border-color: var(--krishna-primary, #ef7f1a);
    box-shadow: 0 0 0 3px rgba(239, 127, 26, 0.15);
}

.krishna-modal-body .krishna-cf-select,
.krishna-modal-body select {
    width: 100%;
    height: 44px;
    background-color: #ffffff;
    border: 1.2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 38px 0 14px;
    font-family: var(--krishna-font-primary, 'Montserrat', sans-serif);
    font-size: 13px;
    color: #475569;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.krishna-modal-body .krishna-cf-textarea,
.krishna-modal-body textarea {
    width: 100%;
    height: 80px;
    min-height: 65px;
    background-color: #ffffff;
    border: 1.2px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-family: var(--krishna-font-primary, 'Montserrat', sans-serif);
    font-size: 13px;
    color: #1e293b;
    box-sizing: border-box;
    resize: vertical;
    transition: all 0.2s ease;
}

.krishna-modal-body .krishna-cf-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Submit Button */
.krishna-modal-body .krishna-cf-submit-wrap {
    grid-column: 1 / -1;
    margin-top: 6px;
}

.krishna-modal-body .krishna-cf-submit,
.krishna-modal-body input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--krishna-primary, #ef7f1a) 0%, #f97316 100%);
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    height: 48px;
    padding: 0 28px;
    font-family: var(--krishna-font-primary, 'Montserrat', sans-serif);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(239, 127, 26, 0.3);
}

.krishna-modal-body .krishna-cf-submit:hover,
.krishna-modal-body input[type="submit"]:hover {
    background: linear-gradient(135deg, #d96f14 0%, #ea580c 100%);
    box-shadow: 0 6px 18px rgba(239, 127, 26, 0.4);
    transform: translateY(-1px);
}

/* CF7 Output Messages in Modal */
.krishna-modal-body .wpcf7-response-output {
    grid-column: 1 / -1;
    margin: 12px 0 0 0 !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-family: var(--krishna-font-primary, 'Montserrat', sans-serif) !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

.krishna-modal-body .wpcf7-not-valid-tip {
    font-size: 11.5px;
    color: #ef4444;
    margin-top: 4px;
    font-weight: 500;
}

/* ==========================================================================
   4. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 768px) {
    .krishna-sticky-bar {
        gap: 5px;
    }

    .krishna-sticky-item {
        height: 44px;
        width: 44px;
        border-radius: 0 8px 8px 0;
    }

    .krishna-sticky-icon {
        width: 44px;
        min-width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .krishna-sticky-label {
        font-size: 13.5px;
        padding-right: 14px;
    }

    .krishna-sticky-inquiry:hover,
    .krishna-sticky-inquiry.is-expanded {
        width: 152px;
    }

    .krishna-sticky-catalogue:hover,
    .krishna-sticky-catalogue.is-expanded {
        width: 140px;
    }

    .krishna-sticky-whatsapp:hover,
    .krishna-sticky-whatsapp.is-expanded {
        width: 146px;
    }

    .krishna-sticky-bar.is-collapsed {
        transform: translateY(-50%) translateX(-44px);
    }

    .krishna-sticky-bar.is-collapsed .krishna-sticky-toggle {
        transform: translateX(44px);
    }

    /* Modal Mobile */
    .krishna-modal-overlay {
        padding: 12px;
    }

    .krishna-modal-header {
        padding: 20px 20px 14px;
    }

    .krishna-modal-title {
        font-size: 20px;
    }

    .krishna-modal-body {
        padding: 18px 20px 24px;
    }

    .krishna-modal-body .krishna-cf-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .krishna-modal-body .krishna-cf-submit,
    .krishna-modal-body input[type="submit"] {
        width: 100%;
    }
}
