/* =============================================
   Urine Test Hydration Impact Checker – Modern UI
   ============================================= */

#uthc-checker {
    padding: 2rem;
    border: none;
    border-radius: 12px;
    max-width: 90vw;
    width: 100%;
    margin: 2rem auto;
    background: linear-gradient(135deg, #e0f7fa, #e8eaf6);
    box-sizing: border-box;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

#uthc-checker h3 {
    text-align: center;
    color: #37474f;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
}

#uthc-checker h3::before {
    content: "\1F4A7";
    display: block !important;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.uthc-intro {
    text-align: center;
    color: #546e7a;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

#uthc-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.uthc-form-group {
    margin-bottom: 0;
}

.uthc-form-group > label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    color: #546e7a;
}

.uthc-required {
    color: #d32f2f;
    font-weight: bold;
}

.uthc-form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #b0bec5;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23546e7a' d='M1.41 0L6 4.58 10.59 0 12 1.41 6 7.41 0 1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px 8px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.uthc-form-group select:focus {
    border-color: #0097a7;
    box-shadow: 0 0 0 3px rgba(0, 151, 167, 0.15);
    outline: none;
}

/* Checkbox Group */
.uthc-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.uthc-checkbox-label {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    color: #37474f;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border: 1px solid #b0bec5;
    border-radius: 20px;
    background-color: #fff;
    transition: background-color 0.2s, border-color 0.2s;
    font-weight: 400 !important;
    margin-bottom: 0 !important;
}

.uthc-checkbox-label:hover {
    background-color: #e0f7fa;
    border-color: #4dd0e1;
}

.uthc-checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    accent-color: #0097a7;
}

.uthc-checkbox-label:has(input:checked) {
    background-color: #e0f7fa;
    border-color: #0097a7;
}

/* Trust Indicators */
.uthc-trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    justify-content: center;
    padding: 0.75rem 0;
}

.uthc-trust-indicators span {
    font-size: 0.85rem;
    color: #00695c;
    font-weight: 500;
    white-space: nowrap;
}

/* Turnstile */
#uthc-checker .cf-turnstile {
    display: flex;
    justify-content: center;
}

/* Submit Button */
#uthc-checker button[type="submit"] {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #00838f, #006064);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

#uthc-checker button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 131, 143, 0.4);
}

#uthc-checker button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =============================================
   Result Card
   ============================================= */

#uthc-checker #uthc-result {
    text-align: left;
    font-size: 1rem;
    margin-top: 1.5rem;
    padding: 0;
    border-radius: 8px;
    transition: all 0.3s;
}

#uthc-checker #uthc-result.has-result {
    padding: 1.25rem 1.5rem;
    background-color: #fafafa;
    border: 1px solid #cfd8dc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: uthc-fadeIn 0.5s ease-in;
}

#uthc-checker #uthc-result.error {
    background-color: #ffebee;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
    padding: 1rem 1.5rem;
    text-align: center;
    font-weight: bold;
    animation: uthc-fadeIn 0.5s ease-in;
}

/* Hydration Score Gauge */
.uthc-score-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.uthc-score-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.uthc-score-circle svg {
    transform: rotate(-90deg);
    width: 120px;
    height: 120px;
}

.uthc-score-circle .uthc-score-bg {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 10;
}

.uthc-score-circle .uthc-score-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-in-out, stroke 0.3s;
}

.uthc-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    font-weight: 700;
    color: #37474f;
}

.uthc-score-label {
    margin-left: 1.25rem;
    text-align: left;
}

.uthc-score-label .uthc-hydration-level {
    font-size: 1.1rem;
    font-weight: 700;
    color: #37474f;
    display: block;
    margin-bottom: 0.25rem;
}

.uthc-score-label .uthc-risk-level {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    display: inline-block;
}

.uthc-risk-low { background-color: #c8e6c9; color: #1b5e20; }
.uthc-risk-moderate { background-color: #fff9c4; color: #f57f17; }
.uthc-risk-high { background-color: #ffcdd2; color: #b71c1c; }

/* Status Badge */
.uthc-status-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.uthc-status-green { background-color: #c8e6c9; color: #1b5e20; }
.uthc-status-green::before { content: "\1F7E2 "; }
.uthc-status-orange { background-color: #fff9c4; color: #f57f17; }
.uthc-status-orange::before { content: "\1F7E0 "; }
.uthc-status-red { background-color: #ffcdd2; color: #b71c1c; }
.uthc-status-red::before { content: "\1F534 "; }

/* Section Titles */
.uthc-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.uthc-section-title.uthc-impact-title { color: #0277bd; }
.uthc-section-title.uthc-actions-title { color: #2e7d32; }
.uthc-section-title.uthc-tests-title { color: #37474f; }
.uthc-section-title.uthc-tip-title { color: #6a1b9a; }

/* Impact text */
.uthc-impact-text {
    color: #37474f;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    padding-left: 0.5rem !important;
    border-left: 3px solid #4fc3f7;
}

/* Actions list */
#uthc-checker .uthc-actions-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 0.5rem 0 !important;
}

#uthc-checker .uthc-actions-list li {
    padding: 0.4rem 0 0.4rem 1.75rem !important;
    position: relative;
    color: #37474f;
    font-size: 0.95rem;
    list-style: none !important;
}

#uthc-checker .uthc-actions-list li::before {
    content: "\2714";
    position: absolute;
    left: 0 !important;
    top: 0.4rem;
    color: #2e7d32;
    font-weight: bold;
    font-size: 0.95rem;
    line-height: 1;
    width: 1.25rem;
    display: inline-block;
}

/* Tests list */
#uthc-checker .uthc-tests-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 0.5rem 0 !important;
}

#uthc-checker .uthc-tests-list li {
    padding: 0.3rem 0 0.3rem 1.75rem !important;
    position: relative;
    color: #37474f;
    font-size: 0.95rem;
    list-style: none !important;
}

#uthc-checker .uthc-tests-list li::before {
    content: "\2022";
    position: absolute;
    left: 0.25rem !important;
    top: 0.3rem;
    color: #37474f;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
    width: 1.25rem;
    display: inline-block;
}

/* Preparation Tip */
.uthc-prep-tip {
    color: #37474f;
    font-size: 0.95rem;
    padding-left: 0.5rem !important;
    border-left: 3px solid #ce93d8;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Share Button */
.uthc-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    color: white !important;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.uthc-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4);
}

.uthc-share-btn::before {
    content: "\1F4E4";
    font-size: 1rem;
}

.uthc-share-copied {
    background: linear-gradient(135deg, #2e7d32, #1b5e20) !important;
}

/* Loading */
#uthc-checker #uthc-result.loading {
    text-align: center;
    padding: 1rem;
    color: #546e7a;
    font-style: italic;
}

@keyframes uthc-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 768px) {
    #uthc-checker { padding: 1rem; margin: 1rem auto; max-width: 95vw; }
    #uthc-checker h3 { font-size: 1.25rem; }
    .uthc-intro { font-size: 0.9rem; }
    .uthc-form-group select { padding: 0.5rem; font-size: 0.9rem; }
    .uthc-checkbox-group { gap: 0.35rem 0.5rem; }
    .uthc-checkbox-label { font-size: 0.85rem; padding: 0.3rem 0.6rem; }
    #uthc-checker button[type="submit"] { padding: 0.5rem; font-size: 0.9rem; }
    #uthc-result { font-size: 0.9rem; }
    .uthc-trust-indicators { flex-direction: column; align-items: center; gap: 0.25rem; }
    .uthc-score-circle, .uthc-score-circle svg { width: 100px; height: 100px; }
    .uthc-score-value { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    #uthc-checker { padding: 0.75rem; margin: 0.75rem auto; }
    #uthc-checker h3 { font-size: 1.1rem; }
    .uthc-form-group > label { font-size: 0.9rem; }
    .uthc-form-group select { padding: 0.5rem; font-size: 0.85rem; }
    .uthc-checkbox-label { font-size: 0.8rem; padding: 0.25rem 0.5rem; }
    #uthc-checker button[type="submit"] { padding: 0.5rem; font-size: 0.85rem; }
    #uthc-result { font-size: 0.85rem; }
    .uthc-score-wrapper { flex-direction: column; gap: 0.5rem; }
    .uthc-score-label { margin-left: 0; text-align: center; }
}
