/* =====================================================
   eLocal Info Network - Contact Assistant
===================================================== */

.skn-assistant {
    --assistant-primary: #198754;
    --assistant-primary-dark: #146c43;
    --assistant-border: #e5e7eb;
    --assistant-text: #212529;
    --assistant-muted: #6c757d;

    font-family: inherit;
}

/* Floating Launcher */

.skn-assistant-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1040;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 54px;
    padding: 0 21px;

    border: none;
    border-radius: 50px;

    background: var(--assistant-primary);
    color: #fff;

    font-size: 15px;
    font-weight: 600;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.18);

    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.skn-assistant-launcher:hover {
    background: var(--assistant-primary-dark);
    transform: translateY(-2px);
}

.skn-assistant-launcher i {
    font-size: 19px;
}


/* Assistant Window */

.skn-assistant-window {
    position: fixed;
    right: 24px;
    bottom: 90px;
    z-index: 1041;

    display: flex;
    flex-direction: column;

    width: 390px;
    max-width: calc(100vw - 32px);
    max-height: min(680px, calc(100dvh - 120px));

    overflow: hidden;

    background: #fff;
    border: 1px solid var(--assistant-border);
    border-radius: 16px;

    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.18);

    animation: skn-assistant-open 0.2s ease;
}

.skn-assistant-window[hidden],
.skn-assistant [hidden] {
    display: none !important;
}

@keyframes skn-assistant-open {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Header */

.skn-assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 17px 18px;

    background: var(--assistant-primary);
    color: #fff;
}

.skn-assistant-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skn-assistant-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);

    font-size: 19px;
}

.skn-assistant-brand h2 {
    margin: 0 0 3px;
    font-size: 16px;
    font-weight: 700;
	color: #fff;
}

.skn-assistant-brand span {
    font-size: 12px;
    opacity: 0.9;
}

.skn-assistant-close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background: transparent;
    color: #fff;

    font-size: 20px;
    cursor: pointer;
}

.skn-assistant-close:hover {
    background: rgba(255, 255, 255, 0.18);
}


/* Assistant Body */

.skn-assistant-body {
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.skn-assistant-intro {
    margin: 0 0 16px;
    color: var(--assistant-muted);
    font-size: 13px;
    line-height: 1.6;
}


/* Options */

.skn-assistant-option {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    min-height: 76px;
    margin-bottom: 12px;
    padding: 12px;

    border: 1px solid var(--assistant-border);
    border-radius: 11px;

    background: #fff;
    color: var(--assistant-text);

    text-align: left;
}

.skn-assistant-option:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.skn-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    flex-shrink: 0;

    border-radius: 10px;
    background: #f1f3f5;
    color: #6c757d;

    font-size: 18px;
}

.skn-option-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.skn-option-content strong {
    font-size: 14px;
    font-weight: 700;
}

.skn-option-content small {
    color: var(--assistant-muted);
    font-size: 11px;
    line-height: 1.4;
}

.skn-option-status {
    max-width: 112px;
    color: #8a6d3b;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    text-align: right;
}

.skn-assistant-option-active {
    border-color: var(--assistant-primary);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.skn-assistant-option-active .skn-option-icon {
    background: #e8f5ee;
    color: var(--assistant-primary);
}

.skn-assistant-option-active:hover {
    background: #f5fbf7;
    border-color: var(--assistant-primary-dark);
}

.skn-option-arrow {
    color: var(--assistant-primary);
    font-size: 13px;
}


/* Back Button */

.skn-assistant-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 17px;
    padding: 0;

    border: none;
    background: transparent;
    color: var(--assistant-primary);

    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.skn-assistant-back:hover {
    color: var(--assistant-primary-dark);
}

#skn-contact-form-view h3,
.skn-contact-waiting h3 {
    margin: 0 0 8px;
    color: var(--assistant-text);
    font-size: 19px;
    font-weight: 700;
}


/* Contact Form */

#skn-contact-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.skn-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skn-form-group label {
    color: var(--assistant-text);
    font-size: 12px;
    font-weight: 600;
}

.skn-form-group label span {
    color: #dc3545;
}

.skn-form-group input,
.skn-form-group select,
.skn-form-group textarea {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;

    border: 1px solid #ced4da;
    border-radius: 7px;

    background: #fff;
    color: var(--assistant-text);

    font-family: inherit;
    font-size: 13px;

    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.skn-form-group textarea {
    min-height: 78px;
    resize: vertical;
}

.skn-form-group input:focus,
.skn-form-group select:focus,
.skn-form-group textarea:focus {
    border-color: var(--assistant-primary);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
}

.skn-form-group .skn-field-error {
    display: none;
    color: #dc3545;
    font-size: 11px;
}

.skn-form-group.has-error input,
.skn-form-group.has-error select,
.skn-form-group.has-error textarea {
    border-color: #dc3545;
}

.skn-form-group.has-error .skn-field-error {
    display: block;
}


/* Submit Button */

.skn-contact-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: 100%;
    min-height: 46px;
    margin-top: 3px;

    border: none;
    border-radius: 8px;

    background: var(--assistant-primary);
    color: #fff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: background 0.2s ease;
}

.skn-contact-submit:hover:not(:disabled) {
    background: var(--assistant-primary-dark);
}

.skn-contact-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}


/* Waiting Message */

.skn-contact-waiting {
    padding: 22px 5px;
    text-align: center;
}

.skn-waiting-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 66px;
    height: 66px;
    margin: 0 auto 17px;

    border-radius: 50%;
    background: #e8f5ee;
    color: var(--assistant-primary);

    font-size: 27px;
}

.skn-contact-waiting p {
    margin: 12px 0;
    color: #495057;
    font-size: 13px;
    line-height: 1.7;
}

.skn-contact-waiting small {
    display: block;
    margin-top: 15px;
    color: var(--assistant-muted);
    font-size: 11px;
    line-height: 1.5;
}


/* Responsive: Tablet */

@media (max-width: 768px) {

    .skn-assistant-launcher {
        right: 18px;
        bottom: 18px;
    }

    .skn-assistant-window {
        right: 16px;
        bottom: 82px;
    }

}


/* Responsive: Mobile */

@media (max-width: 480px) {

    .skn-assistant-launcher {
        right: 14px;
        bottom: 14px;
        min-height: 50px;
        padding: 0 17px;
    }

    .skn-assistant-window {
        right: 8px;
        bottom: 74px;

        width: auto;
        max-width: none;
        left: 8px;

        max-height: calc(100dvh - 100px);
        border-radius: 13px;
    }

    .skn-assistant-header {
        padding: 14px;
    }

    .skn-assistant-body {
        padding: 16px;
    }

}


/* Reduced Motion */

@media (prefers-reduced-motion: reduce) {

    .skn-assistant-window {
        animation: none;
    }

    .skn-assistant-launcher,
    .skn-assistant-option,
    .skn-contact-submit {
        transition: none;
    }

}


/* Accessibility: Keyboard Focus */

.skn-assistant-launcher:focus-visible,
.skn-assistant-close:focus-visible,
.skn-assistant-option:focus-visible,
.skn-assistant-back:focus-visible,
.skn-contact-submit:focus-visible {
    outline: 3px solid rgba(25, 135, 84, 0.35);
    outline-offset: 3px;
}
