/* =====================================================
   Purple Sleek - LimeSurvey Theme
   Lightweight overlay on top of Fruity TwentyThree.
   Edit the variables below to customise the palette.
   ===================================================== */

:root {
    --ps-50:  #faf5ff;
    --ps-100: #f3e8ff;
    --ps-200: #e9d5ff;
    --ps-300: #d8b4fe;
    --ps-400: #c084fc;
    --ps-500: #a855f7;
    --ps-600: #9333ea;
    --ps-700: #7e22ce;
    --ps-800: #6b21a8;
    --ps-900: #581c87;

    --ps-text:    #1f2937;
    --ps-muted:   #6b7280;
    --ps-border:  #ece6f5;
    --ps-bg:      #ffffff;
    --ps-radius:  10px;
    --ps-shadow:  0 4px 24px rgba(124, 58, 237, 0.08);
}

/* ---------- Page background ---------- */
body {
    background: linear-gradient(135deg, var(--ps-50) 0%, var(--ps-100) 100%);
    color: var(--ps-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
}

/* ---------- Survey card ---------- */
.outerframe,
.ls-outerframe-wrapper,
#outerframeContainer {
    background: var(--ps-bg);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    box-shadow: var(--ps-shadow);
}

.outerframe {
    padding: 32px;
    margin: 12px auto 24px;
}

/* ---------- Headings ---------- */
h2, h3, h4,
.question-title,
.questiontitle {
    color: var(--ps-900);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Group title: softer than question titles so the question stays the focus */
h1,
.group-title {
    color: var(--ps-700);
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* ---------- Progress bar ---------- */
.progress {
    background-color: var(--ps-100);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    box-shadow: none;
}

.progress-bar {
    background: linear-gradient(90deg, var(--ps-500), var(--ps-700));
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* ---------- Primary buttons ---------- */
.btn-primary,
.ls-button-submit,
.ls-move-next-btn,
.ls-move-submit-btn,
button[type="submit"].btn {
    background-color: var(--ps-600);
    border-color: var(--ps-600);
    color: #fff;
    border-radius: 8px;
    padding: 10px 22px;
    font-weight: 500;
    transition: all 0.18s ease;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.18);
}

.btn-primary:hover,
.btn-primary:focus,
.ls-button-submit:hover,
.ls-move-next-btn:hover,
.ls-move-submit-btn:hover,
button[type="submit"].btn:hover {
    background-color: var(--ps-700);
    border-color: var(--ps-700);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(147, 51, 234, 0.28);
}

.btn-primary:active {
    background-color: var(--ps-800);
    transform: translateY(0);
}

/* ---------- Secondary / previous buttons ---------- */
.btn-default,
.btn-secondary,
.ls-move-previous-btn {
    background-color: #fff;
    border: 1px solid var(--ps-200);
    color: var(--ps-700);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.18s ease;
}

.btn-default:hover,
.btn-secondary:hover,
.ls-move-previous-btn:hover {
    background-color: var(--ps-50);
    border-color: var(--ps-400);
    color: var(--ps-800);
}

/* ---------- Form controls ---------- */
.form-control,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
textarea,
select {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: none;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--ps-400);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
    outline: none;
}

/* Native radio / checkbox accent */
input[type="radio"],
input[type="checkbox"] {
    accent-color: var(--ps-600);
}

/* ---------- Ranking / sortable selected state ---------- */
/* Override jQuery UI's default green active border for ranking questions */
.ui-state-active,
.ui-state-highlight,
.ui-sortable .ui-state-active,
.ui-sortable .ui-state-highlight,
.sortable-list .ui-state-active,
.ranking-answers li.ui-state-active,
.ranking-answers li.ui-state-highlight {
    border-color: var(--ps-500) !important;
    background-color: var(--ps-50) !important;
    color: var(--ps-900) !important;
}

/* ---------- Links ---------- */
a {
    color: var(--ps-600);
    text-decoration: none;
}
a:hover {
    color: var(--ps-800);
    text-decoration: underline;
}

/* ---------- Tables / matrix questions ---------- */
.table thead th,
table thead th {
    background: var(--ps-50);
    color: var(--ps-900);
    border-bottom: 2px solid var(--ps-200);
    font-weight: 600;
}

.table tbody tr:hover,
.ls-answers tr:hover {
    background: var(--ps-50);
}

/* ---------- Required marker ---------- */
.asterisk,
.ls-required,
.text-danger.asterisk {
    color: var(--ps-600);
}

/* ---------- Alerts ---------- */
.alert {
    border-radius: 8px;
    border-width: 1px;
}

.alert-info {
    background: var(--ps-50);
    border-color: var(--ps-200);
    color: var(--ps-900);
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ---------- Pagination of question groups ---------- */
.ls-progress-container,
#progress-bar {
    margin: 16px 0 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .outerframe {
        padding: 18px;
        margin: 12px;
        border-radius: 8px;
    }

    .btn-primary,
    .ls-button-submit {
        width: 100%;
    }
}
