/* ==========================================================================
   universal.css — Calcuvo UI System (compact, user-friendly sizing)
   ========================================================================== */

:root {
    --primary-color: #166AC5;
    --primary-light: #0f52a0;
    --primary-gradient: linear-gradient(135deg, #166AC5 0%, #0f52a0 100%);
    --secondary-color: #4a90d9;
    --secondary-hover: #5f78d4;
    --secondary-gradient: linear-gradient(135deg, #4a90d9 0%, #3578c0 100%);
    --bg-light: #f4f7fa;
    --text-main: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(22, 106, 197, 0.06);
    --shadow-md: 0 4px 18px rgba(22, 106, 197, 0.09);
    --shadow-lg: 0 8px 30px rgba(22, 106, 197, 0.13);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ════════════════════════════════════════
   CARD
   ════════════════════════════════════════ */
.universal-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(22, 106, 197, 0.07);
    overflow: hidden;
    margin-bottom: 20px;
    transition: var(--transition);
}

.universal-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.universal-card-header {
    background: var(--primary-gradient);
    padding: 11px 18px;
    border-bottom: 3px solid rgba(107, 158, 255, 0.5);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
}

.universal-card-header h4 {
    color: #ffffff;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.2px;
    font-size: 0.9rem;
}

.universal-card-body {
    padding: 18px 20px;
}

.universal-card-body p,
.universal-card-body span,
.universal-card-body li {
    font-size: 13.5px;
    font-weight: 300;
    margin-left: 0;
    line-height: 1.65;
}

/* ════════════════════════════════════════
   LABELS
   ════════════════════════════════════════ */
.universal-label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ════════════════════════════════════════
   INPUTS & SELECTS
   ════════════════════════════════════════ */
.universal-input,
.universal-select,
.universal-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-main);
    background-color: #fff;
    transition: var(--transition);
    outline: none;
    height: 38px;
}

/* Textareas must never be capped at 38px */
textarea.universal-input,
textarea.universal-textarea,
.universal-textarea {
    height: auto !important;
    min-height: 90px;
    resize: vertical;
}

.universal-input:focus,
.universal-select:focus,
.universal-textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

/* ════════════════════════════════════════
   INPUT GROUP
   ════════════════════════════════════════ */
.input-group-premium {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group-premium .input-group-text {
    background-color: #f5f7fb;
    border: 1.5px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0 12px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.input-group-premium > :first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group-premium > :last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group-premium > :not(:first-child):not(:last-child) {
    border-radius: 0 !important;
    border-left: none !important;
}

.input-group-premium:focus-within .input-group-text {
    border-color: var(--secondary-color);
    background-color: rgba(74, 144, 217, 0.05);
}

/* ════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════ */
.btn-universal {
    padding: 9px 18px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    letter-spacing: 0.2px;
    height: 38px;
}

.btn-universal-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(22, 106, 197, 0.28);
}

.btn-universal-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(22, 106, 197, 0.36);
    filter: brightness(1.07);
    color: #ffffff;
}

.btn-universal-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.btn-universal-outline:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-1px);
}

.universal-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    width: 100%;
}

.universal-btn-row .btn-universal {
    flex: 1;
    min-width: 120px;
}

.universal-btn-row .btn-universal-outline {
    flex: 0 0 auto;
    min-width: unset;
}

/* ════════════════════════════════════════
   RESULT BOX
   ════════════════════════════════════════ */
.universal-result-box {
    background: #f7f9fc;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    border-left: 4px solid var(--secondary-color);
    margin-top: 14px;
}

.result-value-large {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* ════════════════════════════════════════
   RADIO & CHECKBOX (pill style)
   ════════════════════════════════════════ */
.universal-control-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.universal-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 6px 14px;
    background: #f5f7fb;
    border: 1.5px solid var(--border-color);
    border-radius: 50px;           /* pill shape */
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--text-muted);
    gap: 7px;
}

.universal-control input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0; height: 0;
}

.universal-control:hover {
    border-color: var(--secondary-color);
    background: #eef1fb;
    color: var(--primary-color);
}

.universal-control:has(input:checked) {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(22, 106, 197, 0.22);
}

/* Radio dot — hidden inside pill design, replaced by checkmark */
.universal-radio-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    flex-shrink: 0;
    position: relative;
    transition: var(--transition);
    background: transparent;
}

.universal-control:has(input:checked) .universal-radio-dot {
    border-color: #fff;
    background: rgba(255,255,255,0.25);
}

.universal-radio-dot::after {
    content: "";
    position: absolute;
    display: none;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #fff;
}

.universal-control input:checked ~ .universal-radio-dot::after {
    display: block;
}

/* ════════════════════════════════════════
   CONTENT / INFO SECTIONS
   ════════════════════════════════════════ */
.content-section h2 {
    color: #000;
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 1.15rem;
    position: relative;
    padding-bottom: 10px;
}

.content-section h3 {
    color: #000;
    font-weight: 700;
    font-size: 1rem;
}

.content-section h4 {
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.content-list {
    list-style: none;
    padding: 0;
}

.content-list li {
    padding: 5px 0 5px 22px;
    position: relative;
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 300;
}

.content-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    position: absolute;
    left: 0;
    top: 6px;
    color: var(--secondary-color);
    font-weight: 900;
    font-size: 0.75rem;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-up {
    animation: fadeInUp 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
