/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Clean background for client environments (matches dashboard) */
.client-bg {
    background: linear-gradient(rgba(244, 247, 246, 0.9), rgba(244, 247, 246, 0.9)), var(--bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.overlay {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    min-height: 100vh;
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    transition: z-index 0s;
}

.card:hover, .card:focus-within {
    z-index: 50;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #475569;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Navigation */
.navbar {
    background: var(--card-bg);
    backdrop-filter: blur(5px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e2e8f0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 40px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Survey Options Layouts */
.options-group {
    width: 100%;
}

.options-group.vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.options-group.horizontal {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0;
}

.options-group.horizontal::-webkit-scrollbar {
    height: 4px;
}

.options-group.horizontal::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.options-group.horizontal .option-label {
    flex: 1;
    justify-content: center;
    flex-direction: column;
    min-width: 45px;
    padding: 0.6rem 0.4rem;
    white-space: nowrap;
    text-align: center;
    gap: 0.25rem;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #fff;
    user-select: none;
}

.option-label:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
}

.option-label input:checked+span,
.option-label:has(input:checked) {
    border-color: var(--primary-color);
    background: #eff6ff !important;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.option-label input[type="radio"],
.option-label input[type="checkbox"] {
    flex-shrink: 0;
}

.exclusive-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.exclusive-badge.active {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    font-weight: 600;
}

.options-group.vertical .exclusive-badge {
    margin-left: auto;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    top: 100%;
    /* Positioning it exactly below the trigger */
    animation: fadeIn 0.2s ease-out;
}

/* Pseudo-element to bridge any small gap and prevent premature closing */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 100px;
    background: transparent;
    z-index: -1;
}


.dropdown-content a,
.dropdown-content button {
    color: #1e293b;
    padding: 10px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-content a:hover,
.dropdown-content button:hover {
    background-color: #f8fafc;
    color: var(--primary-color);
}

.dropdown-content hr {
    margin: 4px 0;
    border: 0;
    border-top: 1px solid #f1f5f9;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.dropdown-trigger:hover {
    background: #e2e8f0;
}

.dropdown-trigger.primary {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}

.dropdown-trigger.primary:hover {
    background: #dbeafe;
}

.dropdown-trigger.success {
    background: #f0fdf4;
    color: #166534;
    border-color: #dcfce7;
}

.dropdown-trigger.success:hover {
    background: #dcfce7;
}