/**
 * Chat Widget – Button, Popup Panel & Mini Request Form
 */

/* =============================================
   Chat With Us Button
   ============================================= */
.chat-with-us-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
    margin-right: 15px;
    vertical-align: middle;
    z-index: 1000;
}

.chat-with-us-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #01024d;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, box-shadow 0.25s, transform 0.2s;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 10px rgba(1, 2, 77, 0.3);
}

.chat-with-us-btn:hover {
    background: #020380;
    box-shadow: 0 4px 16px rgba(1, 2, 77, 0.4);
    transform: translateY(-1px);
}

.chat-with-us-btn:active {
    transform: translateY(0);
}

.chat-with-us-btn i {
    font-size: 16px;
    line-height: 1;
}

/* =============================================
   Popup Panel
   ============================================= */
.chat-popup-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
    z-index: 1001;
}

.chat-popup-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-popup-panel::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
}

.chat-popup-header {
    margin-bottom: 18px;
    text-align: center;
}

.chat-popup-header h3 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #01024d;
    line-height: 1.3;
}

.chat-popup-subtitle {
    margin: 0;
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

/* Social Icons Row */
.chat-popup-social {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 16px;
}

.chat-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    text-decoration: none !important;
    color: #fff !important;
    font-size: 22px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chat-social-icon:hover {
    transform: translateY(-3px);
    color: #fff !important;
}

.chat-social-icon i {
    color: #fff !important;
    font-size: 22px !important;
    line-height: 1;
    margin: 0 !important;
    padding: 0 !important;
}

.chat-social-whatsapp {
    background: #25D366;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.35);
}
.chat-social-whatsapp:hover {
    box-shadow: 0 5px 16px rgba(37, 211, 102, 0.5);
}

.chat-social-viber {
    background: #7360F2;
    box-shadow: 0 3px 10px rgba(115, 96, 242, 0.35);
}
.chat-social-viber:hover {
    box-shadow: 0 5px 16px rgba(115, 96, 242, 0.5);
}

.chat-social-messenger {
    background: linear-gradient(135deg, #00B2FF, #006AFF);
    box-shadow: 0 3px 10px rgba(0, 106, 255, 0.35);
}
.chat-social-messenger:hover {
    box-shadow: 0 5px 16px rgba(0, 106, 255, 0.5);
}

/* Email Link */
.chat-popup-email {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    color: #01024d !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    transition: color 0.2s;
}

.chat-popup-email:hover {
    color: #020380 !important;
    text-decoration: underline !important;
}

.chat-popup-email i {
    font-size: 16px;
    color: inherit !important;
}

/* Divider */
.chat-popup-divider {
    height: 1px;
    background: #eee;
    margin: 14px 0;
}

/* Request a Boat Button */
.chat-popup-request-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #01024d;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, box-shadow 0.25s;
}

.chat-popup-request-btn:hover {
    background: #020380;
    box-shadow: 0 4px 14px rgba(1, 2, 77, 0.3);
}

.chat-popup-request-btn i {
    font-size: 16px;
}

/* =============================================
   Mini Request Form Modal (Magnific Popup)
   ============================================= */
.mini-request-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 640px;
    margin: 40px auto;
    padding: 0;
    overflow: hidden;
}

.mini-request-inner {
    padding: 32px 36px 36px;
    max-height: 85vh;
    overflow-y: auto;
}

.mini-request-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: #01024d;
    text-align: center;
}

.mini-request-subtitle {
    margin: 0 0 24px;
    font-size: 14px;
    color: #888;
    text-align: center;
    line-height: 1.5;
}

/* Field Groups */
.mini-field-group {
    margin-bottom: 20px;
}

.mini-field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.2px;
}

.mini-field-label .required {
    color: #e74c3c;
}

.mini-field-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
}

.mini-field-input:focus {
    border-color: #01024d;
    box-shadow: 0 0 0 3px rgba(1, 2, 77, 0.08);
    background: #fff;
}

.mini-field-input.has-error {
    border-color: #e74c3c;
}

.mini-field-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fafafa;
    box-sizing: border-box;
    outline: none;
    cursor: pointer;
}

.mini-field-select:focus {
    border-color: #01024d;
    box-shadow: 0 0 0 3px rgba(1, 2, 77, 0.08);
}

/* Field Errors */
.mini-field-error {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 4px;
    min-height: 0;
}

/* Checkbox Grid (boat types) */
.mini-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mini-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 13px;
    color: #444;
    margin: 0;
}

.mini-checkbox-item:hover {
    border-color: #01024d;
    background: #f5f5ff;
}

.mini-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #01024d;
}

.mini-checkbox-item input[type="checkbox"]:checked + span {
    color: #01024d;
    font-weight: 600;
}

/* Date Row */
.mini-dates-row {
    display: flex;
    gap: 12px;
}

.mini-dates-row .mini-field-input {
    flex: 1;
    cursor: pointer;
}

/* Guest Counter */
.mini-guest-counter {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.mini-guest-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #01024d;
    font-size: 14px;
    transition: background 0.15s;
}

.mini-guest-btn:hover {
    background: #f0f0f0;
}

.mini-guest-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background: transparent;
    padding: 0;
    -moz-appearance: textfield;
    outline: none;
}

.mini-guest-input::-webkit-outer-spin-button,
.mini-guest-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Radio Group */
.mini-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-radio-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid #e8e8e8;
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 13px;
    color: #444;
    margin: 0;
    white-space: nowrap;
}

.mini-radio-item:hover {
    border-color: #01024d;
    background: #f5f5ff;
}

.mini-radio-item input[type="radio"] {
    margin: 0;
    accent-color: #01024d;
}

.mini-radio-item input[type="radio"]:checked + span {
    color: #01024d;
    font-weight: 600;
}

.mini-radio-inline {
    gap: 6px;
}

/* Name Row */
.mini-field-row {
    display: flex;
    gap: 12px;
}

.mini-field-half {
    flex: 1;
}

/* Phone Row */
.mini-phone-row {
    display: flex;
    gap: 10px;
}

.mini-phone-code {
    width: 130px !important;
    flex-shrink: 0;
}

.mini-phone-number {
    flex: 1;
}

/* Submit Button */
.mini-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #01024d;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s, box-shadow 0.25s;
    margin-top: 8px;
}

.mini-submit-btn:hover {
    background: #020380;
    box-shadow: 0 4px 14px rgba(1, 2, 77, 0.3);
}

.mini-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Success Message */
.mini-request-success {
    text-align: center;
    padding: 40px 20px;
}

.mini-success-icon {
    font-size: 56px;
    color: #25D366;
    margin-bottom: 16px;
}

.mini-request-success h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #01024d;
}

.mini-request-success p {
    margin: 0;
    font-size: 15px;
    color: #666;
}

/* Magnific Popup close button override */
.mini-request-modal .mfp-close {
    color: #999 !important;
    font-size: 28px;
    right: 8px;
    top: 8px;
}

.mini-request-modal .mfp-close:hover {
    color: #333 !important;
}

/* =============================================
   "or let us search for you" – Homepage Banner
   (Legacy – replaced by .hero-social-proof in
    header-boat-search.css)
   ============================================= */

/* When header becomes sticky (cloned), use solid style */
.transparent-header #header.cloned .chat-with-us-btn {
    background: #01024d;
    color: #fff;
}

/* =============================================
   Responsive
   ============================================= */

/* Tablet */
@media (max-width: 992px) {
    .chat-with-us-wrapper {
        margin-left: 10px;
        margin-right: 10px;
    }

    .chat-with-us-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .chat-with-us-btn i {
        font-size: 15px;
    }

    .chat-popup-panel {
        width: 300px;
        padding: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .chat-with-us-wrapper {
        position: static;
        margin-left: 6px;
        margin-right: 6px;
    }

    .chat-with-us-btn {
        padding: 7px 14px;
        font-size: 12px;
        border-radius: 20px;
    }

    .chat-with-us-btn span {
        display: none;
    }

    .chat-with-us-btn i {
        font-size: 18px;
    }

    /* Popup becomes centered fixed overlay on mobile */
    .chat-popup-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 24px 20px 30px;
        transform: translateY(100%);
    }

    .chat-popup-panel.active {
        transform: translateY(0);
    }

    .chat-popup-panel::before {
        display: none;
    }

    /* Mini form adjustments */
    .mini-request-modal {
        margin: 10px;
        border-radius: 12px;
    }

    .mini-request-inner {
        padding: 24px 20px 28px;
    }

    .mini-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .mini-dates-row {
        flex-direction: column;
        gap: 8px;
    }

    .mini-field-row {
        flex-direction: column;
        gap: 12px;
    }

    .mini-phone-row {
        flex-direction: column;
        gap: 8px;
    }

    .mini-phone-code {
        width: 100% !important;
    }

    .mini-radio-group {
        gap: 6px;
    }

    .mini-radio-item {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .chat-with-us-wrapper {
        margin-left: 4px;
        margin-right: 4px;
    }

    .chat-popup-panel {
        padding: 20px 16px 26px;
    }

    .chat-social-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .chat-social-icon i {
        font-size: 20px !important;
    }
}

/* Mobile popup backdrop */
@media (max-width: 768px) {
    .chat-popup-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s, visibility 0.25s;
    }

    .chat-popup-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
}

/* =============================================
   Dark mode
   ============================================= */
#dark-mode .chat-popup-panel {
    background: #1e1e2e;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

#dark-mode .chat-popup-panel::before {
    background: #1e1e2e;
}

#dark-mode .chat-popup-header h3 {
    color: #fff;
}

#dark-mode .chat-popup-subtitle {
    color: #aaa;
}

#dark-mode .chat-popup-email {
    color: #9dc4ff !important;
}

#dark-mode .chat-popup-divider {
    background: #333;
}
