﻿/* Global box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Body */
body {
    font-family: Arial, sans-serif;
    background-color: #f1f7fb;
    margin: 0;
    padding: 0;
}

/* ✅ Navbar Styling — final and only rule */
nav.navbar-kindspeak {
    background-color: #000000 !important;
}
/* Black */
.navbar-kindspeak .navbar-brand,
.navbar-kindspeak .nav-link,
.navbar-kindspeak .navbar-text {
    color: #ffffff !important;
}

    .navbar-kindspeak .nav-link:hover {
        color: #ffd700 !important;
    }

.navbar-kindspeak .btn-outline-light {
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
}

/* Header styling */
h1 {
    text-align: center;
    color: #006d77;
}

p {
    text-align: center;
    font-weight: bold;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    color: #888;
    font-size: 0.9rem;
}

/* Form labels */
label {
    font-weight: bold;
    margin-top: 1rem;
    display: block;
}

/* Textarea */
textarea {
    width: 100%;
    height: 125px;
    padding: 0.75rem;
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    margin-top: 0.5rem;
}

/* Dropdown */
select {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #333;
    background-color: #fdfdfd;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Spinner/loading */
#loading {
    margin-top: 1.5rem;
    display: none;
    padding: 1rem;
    background-color: #fff;
    border-radius: 6px;
    text-align: center;
    font-style: italic;
    color: #555;
}

.spinner {
    border: 4px solid #ccc;
    border-top: 4px solid #029e9d;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Result boxes */
.result-box {
    display: none;
    margin-top: 0.5rem;
    border: 1px dashed #ccc;
    border-radius: 6px;
    padding: 0.5rem;
}

.single-result.result-box {
    background-color: #e6f4ea;
    border-color: #b2d8b2;
}
/* Soft green */
#result-box.result-box {
    background-color: #e7f2fb;
    border-color: #a0c4de;
}
/* Soft blue */

/* Focus outline */
button:focus, textarea:focus, select:focus {
    outline: 2px solid #029e9d;
    outline-offset: 2px;
}

/* Button stack */
.button-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Circular button (larger icon) */
.circular-btn {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    border: none;
    background-color: #006d77;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .3s ease, transform .2s ease;
}

    .circular-btn:hover {
        background-color: #004f55;
        transform: scale(1.05);
    }

    .circular-btn i {
        font-size: 1em;
        line-height: 1;
        display: block;
        pointer-events: none;
    }

    .circular-btn svg {
        display: block;
        width: 1.0em;
        height: 1.0em;
        line-height: 1;
        stroke: currentColor;
        stroke-width: 3;
        pointer-events: none;
    }

/* Clear button */
.clear-btn {
    min-width: 120px;
    padding: .5rem 1.25rem;
    background-color: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: background-color .3s ease, transform .2s ease;
}

    .clear-btn:hover {
        background-color: #cccccc;
        transform: scale(1.05);
    }

    .clear-btn i, .clear-btn svg {
        font-size: 1rem;
        width: 1.1em;
        height: 1.1em;
        line-height: 1;
        stroke: currentColor;
        stroke-width: 2.5;
        pointer-events: none;
    }

/* Help circle */
.ks-help-circle {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background-color: #4da3ff !important;
    color: #fff !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    padding: 0 !important;
}

    .ks-help-circle:hover {
        background-color: #0b5ed7 !important;
    }

/* Mobile */
@media (max-width: 400px) {
    .circular-btn {
        width: 4rem;
        height: 4rem;
        font-size: 1.8rem;
    }
}

/* Message box */
.message-box {
    margin-bottom: 1rem;
}

/* ---------- Star Rating ---------- */

/* Base look */
.ks-rating {
    align-items: center;
    gap: .25rem;
    user-select: none;
}

.ks-star {
    cursor: pointer;
    font-size: 1.25rem;
    opacity: .5;
    transition: transform .05s, opacity .15s;
}

    .ks-star:hover, .ks-star.ks-selected, .ks-star.ks-active {
        opacity: 1;
        transform: translateY(-1px);
    }

.ks-thanks {
    font-size: .9rem;
}

/* Visibility rules — hide by default, show only on real results */
#result-box .ks-rating {
    display: none;
}

#result-box[data-has-result="1"] .ks-rating {
    display: inline-flex;
}

/* Also hide the label unless there is a real result */
#result-box .ks-label {
    display: none;
}

#result-box[data-has-result="1"] .ks-rating .ks-label {
    display: inline;
}
