/* ============================================
   Floating Help Widget - Modern Design
   ============================================ */

/* Floating Widget Button - Chat Widget Style */
.help-widget-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    min-width: 200px;
    max-width: 240px;
    height: auto;
    min-height: 60px;
    border-radius: 30px 30px 0 30px;
    background: linear-gradient(135deg, #FF8A00 0%, #FFA733 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(255, 115, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 20px;
    gap: 12px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
}

.help-widget-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.help-widget-button:hover::before {
    opacity: 1;
}

.help-widget-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 115, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

/* Pulsing Animation */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 115, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 115, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.2);
    }
}

.help-widget-button {
    animation: pulse 2s ease-in-out infinite;
}

.help-widget-button:hover {
    animation: none;
}

/* Chat Icon Container */
.help-widget-button-icon-container {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Button Icon */
.help-widget-button-icon {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    display: block;
}

/* Button Text */
.help-widget-button-text {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    line-height: 1.3;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.help-widget-button-text span {
    display: block;
}

/* Responsive - Show icon only on small screens */
@media (max-width: 768px) {
    .help-widget-button {
        min-width: 60px;
        max-width: 60px;
        width: 60px;
        height: 60px;
        min-height: 60px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
        bottom: 20px;
        right: 20px;
    }
    
    .help-widget-button-text {
        display: none;
    }
    
    .help-widget-button-icon-container {
        width: auto;
        height: auto;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    .help-widget-button-icon {
        font-size: 28px;
    }
}

/* Modal Backdrop */
#helpWidgetModal .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Modal Dialog */
#helpWidgetModal .modal-dialog {
    max-width: 680px;
    margin: 1.75rem auto;
}

/* Modal Content */
#helpWidgetModal .modal-content {
    border: none;
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    background: #111B2E;
}

/* Modal Header */
#helpWidgetModal .modal-header {
    border: none;
    padding: 32px 40px 24px;
    position: relative;
    background: #111B2E;
}

/* Close Button */
#helpWidgetModal .btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: #16233D;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    opacity: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
}

#helpWidgetModal .btn-close:hover {
    background: #0F1A30;
    transform: rotate(90deg);
}

#helpWidgetModal .btn-close::before {
    content: '×';
    color: #B8C1D1;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
}

#helpWidgetModal .btn-close:focus {
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.2);
}

/* Modal Title */
#helpWidgetModal .modal-title {
    font-size: 26px;
    font-weight: 700;
    color: #F5F7FA;
    margin: 0 0 12px 0;
    padding: 0;
    line-height: 1.3;
    font-family: 'Poppins', sans-serif;
}

/* Modal Subtitle */
#helpWidgetModal .modal-subtitle {
    font-size: 15px;
    color: #B8C1D1;
    line-height: 1.6;
    margin: 0;
    font-family: 'Roboto', sans-serif;
}

/* Modal Body */
#helpWidgetModal .modal-body {
    padding: 0 40px 32px;
    position: relative;
}

/* Category Section */
#helpWidgetModal .category-section {
    margin-bottom: 32px;
}

#helpWidgetModal .category-label {
    font-size: 15px;
    font-weight: 600;
    color: #F5F7FA;
    margin-bottom: 16px;
    display: block;
    font-family: 'Poppins', sans-serif;
}

/* Category Chips Container */
#helpWidgetModal .category-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

/* Category Chip */
#helpWidgetModal .category-chip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background-color: #0F1A30;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #B8C1D1;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    min-height: 52px;
}

#helpWidgetModal .category-chip:hover {
    border-color: #FF8A00;
    background-color: rgba(255, 138, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.15);
}

#helpWidgetModal .category-chip.selected {
    border-color: #FF8A00;
    background: linear-gradient(135deg, #FF8A00 0%, #FFA733 100%);
    color: #0B1220;
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.3);
}

#helpWidgetModal .category-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Category Icon */
#helpWidgetModal .category-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

/* Category Text */
#helpWidgetModal .category-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Form Section */
#helpWidgetModal .form-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Form Group */
#helpWidgetModal .form-group {
    margin-bottom: 20px;
}

/* Form Labels */
#helpWidgetModal .form-label {
    font-size: 14px;
    font-weight: 600;
    color: #F5F7FA;
    margin-bottom: 8px;
    display: block;
    font-family: 'Poppins', sans-serif;
}

#helpWidgetModal .form-label .optional {
    color: #8A94A6;
    font-weight: 400;
    font-size: 13px;
    margin-left: 4px;
}

/* Form Inputs */
#helpWidgetModal .form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    background-color: #0F1A30;
    color: #F5F7FA;
    font-family: 'Roboto', sans-serif;
}

#helpWidgetModal .form-control:focus {
    outline: none;
    border-color: #2F80ED;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.2);
    background-color: #0F1A30;
}

#helpWidgetModal .form-control::placeholder {
    color: #8A94A6;
    font-size: 14px;
}

#helpWidgetModal .form-control.is-invalid {
    border-color: #e53e3e;
}

#helpWidgetModal .form-control.is-invalid:focus {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* Textarea */
#helpWidgetModal textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Contact Method Selector */
#helpWidgetModal .contact-method-selector {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

#helpWidgetModal .contact-method-option {
    flex: 1;
    margin: 0;
    cursor: pointer;
}

#helpWidgetModal .contact-method-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

#helpWidgetModal .contact-method-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background-color: #0F1A30;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    color: #B8C1D1;
    font-family: 'Roboto', sans-serif;
    text-align: center;
}

#helpWidgetModal .contact-method-option:hover .contact-method-label {
    border-color: #FF8A00;
    background-color: rgba(255, 138, 0, 0.1);
}

#helpWidgetModal .contact-method-option input[type="radio"]:checked + .contact-method-label {
    border-color: #FF8A00;
    background: linear-gradient(135deg, #FF8A00 0%, #FFA733 100%);
    color: #0B1220;
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.2);
}

#helpWidgetModal .contact-method-option input[type="radio"]:focus + .contact-method-label {
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.2);
}

#helpWidgetModal .contact-icon {
    font-size: 18px;
    line-height: 1;
}

/* Message Alert */
#helpWidgetModal #helpWidgetMessage {
    margin-top: 16px;
    margin-bottom: 0;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    border: none;
}

#helpWidgetModal #helpWidgetMessage.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

#helpWidgetModal #helpWidgetMessage.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Modal Footer */
#helpWidgetModal .modal-footer {
    border: none;
    padding: 0 40px 32px;
    flex-direction: column;
    gap: 12px;
}

/* Primary CTA Button */
#helpWidgetModal .btn-help-primary {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    color: #0B1220;
    background: #FF8A00;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    text-transform: none;
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.3);
    position: relative;
    overflow: hidden;
}

#helpWidgetModal .btn-help-primary::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.5s ease;
}

#helpWidgetModal .btn-help-primary:hover::before {
    left: 100%;
}

#helpWidgetModal .btn-help-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 138, 0, 0.4);
    background: #FFA733;
}

#helpWidgetModal .btn-help-primary:active {
    transform: translateY(0);
}

#helpWidgetModal .btn-help-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Trust Note */
#helpWidgetModal .trust-note {
    text-align: center;
    font-size: 12px;
    color: #B8C1D1;
    margin-top: 12px;
    line-height: 1.5;
}

#helpWidgetModal .trust-note svg {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
    fill: #B8C1D1;
}

/* Responsive Design */
@media (max-width: 768px) {
    #helpWidgetModal .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    #helpWidgetModal .modal-header {
        padding: 24px 20px 20px;
    }

    #helpWidgetModal .modal-title {
        font-size: 22px;
    }

    #helpWidgetModal .modal-subtitle {
        font-size: 14px;
    }

    #helpWidgetModal .modal-body {
        padding: 0 20px 24px;
    }

    #helpWidgetModal .category-chips {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #helpWidgetModal .category-chip {
        padding: 12px 14px;
        font-size: 13px;
        min-height: 48px;
    }

    #helpWidgetModal .category-icon {
        font-size: 16px;
    }

    #helpWidgetModal .form-control {
        padding: 12px 14px;
        font-size: 14px;
    }

    #helpWidgetModal .modal-footer {
        padding: 0 20px 24px;
    }

    #helpWidgetModal .btn-help-primary {
        padding: 14px 20px;
        font-size: 15px;
    }

    #helpWidgetModal .contact-method-selector {
        flex-direction: column;
        gap: 10px;
    }

    #helpWidgetModal .contact-method-label {
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    #helpWidgetModal .category-chips {
        grid-template-columns: 1fr;
    }
}

/* Animation for Modal Entry */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#helpWidgetModal.show .modal-dialog {
    animation: modalFadeIn 0.3s ease-out;
}

/* Prevent body scroll when modal is open */
body.modal-open-help {
    overflow: hidden;
}

