/* Appuals Tech Support Widget Styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
    --ats-red: #cc0000;
    --ats-red-dark: #a30000;
    --ats-red-light: #ff1a1a;
    --ats-black: #0f0f0f;
    --ats-paper: #f9f9f9;
    --ats-border: #e5e5e5;
    --ats-gray-50: #fafafa;
    --ats-gray-100: #f5f5f5;
    --ats-gray-200: #eeeeee;
    --ats-gray-300: #e0e0e0;
    --ats-gray-400: #bdbdbd;
    --ats-gray-500: #9e9e9e;
    --ats-gray-600: #757575;
    --ats-gray-700: #616161;
    --ats-gray-800: #424242;
    --ats-green: #22c55e;
    --ats-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --ats-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16);
    --ats-radius: 12px;
    --ats-radius-sm: 8px;
    --ats-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ats-mono: 'DM Mono', 'SF Mono', 'Fira Code', monospace;
}

/* Widget Wrapper */
.ats-widget-wrap {
    position: fixed;
    bottom: 160px;
    right: 24px;
    z-index: 2147483647;
    font-family: var(--ats-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ats-black);
    -webkit-font-smoothing: antialiased;
}

.ats-widget-wrap *,
.ats-widget-wrap *::before,
.ats-widget-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Trigger Button */
.ats-trigger {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ats-red);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(204, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ats-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(204, 0, 0, 0.5);
}

.ats-trigger:active {
    transform: scale(0.95);
}

/* Pulse Animation */
.ats-trigger-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--ats-red);
    animation: ats-pulse 2s ease-out infinite;
    z-index: -1;
}

@keyframes ats-pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Tooltip */
.ats-tooltip {
    position: absolute;
    bottom: 68px;
    right: 0;
    background: var(--ats-black);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--ats-radius-sm);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--ats-shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: ats-tooltip-in 0.3s ease;
}

.ats-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--ats-black);
    transform: rotate(45deg);
}

.ats-tooltip-close {
    background: none;
    border: none;
    color: var(--ats-gray-400);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.ats-tooltip-close:hover {
    color: #fff;
}

@keyframes ats-tooltip-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Panel */
.ats-panel {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 420px;
    max-height: 80vh;
    background: #fff;
    border-radius: var(--ats-radius);
    box-shadow: var(--ats-shadow-lg);
    overflow-y: auto;
    animation: ats-panel-in 0.3s ease;
    border: 1px solid var(--ats-border);
}

@keyframes ats-panel-in {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Panel Header */
.ats-panel-header {
    padding: 20px 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--ats-border);
    background: var(--ats-black);
    color: #fff;
    border-radius: var(--ats-radius) var(--ats-radius) 0 0;
}

.ats-panel-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff;
}

.ats-panel-header p {
    font-size: 13px;
    color: var(--ats-gray-400);
    margin: 0;
}

.ats-panel-close {
    background: none;
    border: none;
    color: var(--ats-gray-400);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    transition: color 0.15s;
}

.ats-panel-close:hover {
    color: #fff;
}

/* Trust Bar */
.ats-trust-bar {
    padding: 10px 20px;
    background: var(--ats-gray-50);
    font-size: 12px;
    color: var(--ats-gray-600);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--ats-border);
}

/* Step Container */
.ats-step {
    padding: 16px 20px 20px;
}

/* Service Cards */
.ats-services {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ats-service-card {
    border: 1px solid var(--ats-border);
    border-radius: var(--ats-radius-sm);
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    position: relative;
}

.ats-service-card:hover {
    border-color: var(--ats-red);
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.08);
}

.ats-service-popular {
    border-color: var(--ats-red);
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
}

.ats-badge {
    position: absolute;
    top: -10px;
    right: 12px;
    background: var(--ats-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.ats-service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ats-service-header h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--ats-black);
}

.ats-service-price {
    font-family: var(--ats-mono);
    font-size: 20px;
    font-weight: 500;
    color: var(--ats-black);
}

.ats-service-price small {
    font-size: 12px;
    color: var(--ats-gray-500);
}

.ats-service-desc {
    font-size: 13px;
    color: var(--ats-gray-600);
    margin: 0 0 10px;
}

.ats-service-features {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--ats-gray-700);
}

.ats-service-features li {
    padding: 2px 0;
    padding-left: 18px;
    position: relative;
}

.ats-service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--ats-green);
}

.ats-service-select {
    width: 100%;
    padding: 10px;
    background: var(--ats-black);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: var(--ats-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.ats-service-select:hover {
    background: #2a2a2a;
}

.ats-service-popular .ats-service-select {
    background: var(--ats-red);
}

.ats-service-popular .ats-service-select:hover {
    background: var(--ats-red-dark);
}

/* Back Button */
.ats-back-btn {
    background: none;
    border: none;
    color: var(--ats-gray-600);
    font-family: var(--ats-font);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ats-back-btn:hover {
    color: var(--ats-black);
}

/* Selected Service Banner */
.ats-selected-service-banner {
    background: var(--ats-gray-50);
    border: 1px solid var(--ats-border);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Issue Form */
.ats-issue-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ats-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--ats-gray-800);
}

.ats-form-group label .required {
    color: var(--ats-red);
}

.ats-form-group input,
.ats-form-group textarea,
.ats-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ats-border);
    border-radius: 6px;
    font-family: var(--ats-font);
    font-size: 14px;
    color: var(--ats-black);
    background: #fff;
    transition: border-color 0.15s;
    outline: none;
}

.ats-form-group input:focus,
.ats-form-group textarea:focus,
.ats-form-group select:focus {
    border-color: var(--ats-red);
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.08);
}

.ats-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.ats-form-footer {
    text-align: center;
}

.ats-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--ats-red);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--ats-font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.ats-submit-btn:hover {
    background: var(--ats-red-dark);
}

.ats-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ats-guarantee {
    font-size: 11px;
    color: var(--ats-gray-500);
    margin-top: 8px;
}

/* Loading */
.ats-loading {
    text-align: center;
    padding: 40px 20px;
}

.ats-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--ats-gray-200);
    border-top-color: var(--ats-red);
    border-radius: 50%;
    animation: ats-spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes ats-spin {
    to { transform: rotate(360deg); }
}

.ats-loading p {
    color: var(--ats-gray-600);
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .ats-widget-wrap {
        bottom: 16px;
        right: 16px;
    }

    .ats-panel {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-height: 90vh;
        border-radius: var(--ats-radius) var(--ats-radius) 0 0;
        animation: ats-sheet-in 0.3s ease;
    }

    @keyframes ats-sheet-in {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .ats-tooltip {
        display: none !important;
    }

    .ats-trigger {
        width: 50px;
        height: 50px;
    }
}
