html {
  font-size: 14px;
}

html, body {
    height: 100%;
    margin: 0;
}

#quiz-results-ad {
    transition: min-height 0.3s ease;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Professional Theme */
.survey-theme-professional {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Fun Theme */
.survey-theme-fun {
    --primary-color: #e74c3c;
    --secondary-color: #f39c12;
    --accent-color: #9b59b6;
    --font-family: 'Comic Sans MS', cursive, sans-serif;
}

/* Friendly Theme */
.survey-theme-friendly {
    --primary-color: #27ae60;
    --secondary-color: #2ecc71;
    --accent-color: #f1c40f;
    --font-family: 'Nunito', 'Arial Rounded MT Bold', sans-serif;
}

/* Base Survey Styles */
.survey-container {
    font-family: var(--font-family);
    color: var(--primary-color);
}

.survey-header {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem;
}

.survey-question {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    margin: 1rem 0;
}

.survey-button {
    background-color: var(--accent-color);
    border: none;
    color: white;
}

:root {
    --apple-white: #ffffff;
    --apple-light: #f5f5f7;
    --apple-gray: #86868b;
    --apple-dark: #1d1d1f;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-border: #d2d2d7;
    --apple-radius: 12px;
    --apple-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--apple-light);
    color: var(--apple-dark);
    line-height: 1.5;
    padding: 0;
    margin: 0;
}

.apple-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.apple-header {
    text-align: center;
    margin-bottom: 40px;
}

.apple-title {
    font-size: 32px;
    font-weight: 600;
    margin: 0;
    color: var(--apple-dark);
}

.apple-subtitle {
    font-size: 18px;
    color: var(--apple-gray);
    margin-top: 8px;
}

.apple-form {
    background: var(--apple-white);
    border-radius: var(--apple-radius);
    padding: 30px;
    box-shadow: var(--apple-shadow);
}

.apple-form-group {
    margin-bottom: 24px;
}

.apple-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--apple-dark);
}

.apple-input, .apple-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--apple-border);
    border-radius: var(--apple-radius);
    background-color: var(--apple-white);
    transition: border-color 0.2s;
}

    .apple-input:focus, .apple-select:focus {
        outline: none;
        border-color: var(--apple-blue);
    }

    .apple-input::placeholder {
        color: var(--apple-gray);
        opacity: 0.6;
    }

.apple-file-upload {
    position: relative;
    overflow: hidden;
}

.apple-file-label {
    display: flex;
    cursor: pointer;
}

.apple-file-button {
    background-color: var(--apple-blue);
    color: white;
    padding: 12px 20px;
    border-radius: var(--apple-radius);
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s;
}

    .apple-file-button:hover {
        background-color: var(--apple-blue-hover);
    }

.apple-file-name {
    margin-left: 16px;
    align-self: center;
    color: var(--apple-gray);
    font-size: 15px;
}

.apple-file-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.apple-switch-group {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.apple-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 32px;
    margin-right: 12px;
}

    .apple-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.apple-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

    .apple-slider:before {
        position: absolute;
        content: "";
        height: 24px;
        width: 24px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .apple-slider {
    background-color: var(--apple-blue);
}

    input:checked + .apple-slider:before {
        transform: translateX(20px);
    }

.apple-switch-label {
    font-size: 15px;
    font-weight: 500;
}

.apple-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

.apple-button {
    padding: 12px 24px;
    border-radius: var(--apple-radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

    .apple-button.primary {
        background-color: var(--apple-blue);
        color: white;
        border: none;
    }

        .apple-button.primary:hover {
            background-color: var(--apple-blue-hover);
        }

    .apple-button.secondary {
        background-color: transparent;
        color: var(--apple-blue);
        border: 1px solid var(--apple-blue);
    }

        .apple-button.secondary:hover {
            background-color: rgba(0, 113, 227, 0.05);
        }

.apple-validation {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: #ff3b30;
}

@media (max-width: 600px) {
    .apple-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .apple-form {
        padding: 20px;
    }

    .apple-title {
        font-size: 26px;
    }
}

.apple-image-preview {
    border: 1px solid var(--apple-border);
    border-radius: var(--apple-radius);
    padding: 12px;
    background-color: var(--apple-light);
    text-align: center;
}

.apple-preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: calc(var(--apple-radius) - 4px);
    object-fit: contain;
}

/* Table Styles */
.apple-table-container {
    background: var(--apple-white);
    border-radius: var(--apple-radius);
    box-shadow: var(--apple-shadow);
    overflow: hidden;
    margin-top: 24px;
}

.apple-table {
    width: 100%;
    border-collapse: collapse;
}

    .apple-table th {
        text-align: left;
        padding: 16px;
        background-color: var(--apple-light);
        color: var(--apple-gray);
        font-weight: 500;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .apple-table td {
        padding: 16px;
        border-top: 1px solid var(--apple-border);
        vertical-align: middle;
    }

.apple-table-primary {
    font-weight: 500; 
}

:root {
    --primary-color: #4a6bff;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
    background-color: #f5f7ff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.survey-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.question-wrapper {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

    .question-wrapper.hidden {
        display: none !important;
    }

    .question-wrapper.show {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }

    .question-wrapper:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.answer-help-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: block;
}

/* Radio button styling */
.form-group {
    margin-top: 12px;
}

    .form-group div {
        position: relative;
        margin-bottom: 12px;
    }

    .form-group input[type="radio"] {
        position: absolute;
        opacity: 0;
    }

    .form-group label {
        display: inline-block;       
        position: relative;
        cursor: pointer;
        font-size: 1rem;
        color: #495057;
        transition: color 0.2s;
    }

        
    .form-group input[type="radio"]:checked + label:before {
        border-color: var(--primary-color);
    }

    .form-group input[type="radio"]:checked + label:after {
        opacity: 1;
        transform: scale(1);
    }

    .form-group input[type="radio"]:focus + label:before {
        box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
    }

    .form-group label:hover {
        color: var(--primary-color);
    }

/* Countdown timer */
.countdown-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.countdown-bar-container {
    max-width: 600px;
    margin: 0 auto;
}

.countdown-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    text-align: center;
    margin-bottom: 6px;
}

.countdown-bar {
    border-radius: 12px;
    overflow: hidden;
    background-color: #f1f1f1;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    height: 26px;
}

.progress-bar.bg-gradient {
    background-image: linear-gradient(90deg, #00c9ff, #92fe9d);
    transition: width 1s linear;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: #000;
}

.progress-bar.pulse {
    animation: pulse 1s infinite;
}

@@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

/* Button styling */
.btn-navigation {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-next {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-next:hover {
        background-color: #3a5bef;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

.btn-submit {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

    .btn-submit:hover {
        background-color: #218838;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

.btn-previous {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

    .btn-previous:hover {
        background-color: #f0f3ff;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

/* Lock overlay */
#lockArea {
    position: relative;
}

#lockOverlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 10;
    pointer-events: all;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
}

.lock-icon {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 16px;
}

.lock-message {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--danger-color);
    text-align: center;
    max-width: 80%;
}

/* Welcome card */
.welcome-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: none;
    margin-bottom: 30px;
}

    .welcome-card .card-body {
        padding: 30px;
    }

.welcome-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .survey-container {
        padding: 15px;
    }

    .question-wrapper {
        padding: 18px;
    }

    .welcome-card .card-body {
        padding: 20px;
    }
}

/* Custom checkbox styling */
.question-container {
    padding: 12px;
    border-radius: 8px;
    background-color: #f8f9fa; /* Light gray background */
}

.checkbox-item {
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

    .checkbox-item:hover {
        background-color: #e9ecef; /* Slightly darker on hover */
    }

.checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: #0d6efd; /* Bootstrap primary blue */
    cursor: pointer;
}

.checkbox-label {
    cursor: pointer;
    user-select: none; /* Prevent text selection */
    font-size: 1rem;
    color: #212529; /* Dark text color */
}

#installPwaBtn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
}

