/* Root Variables injected via PHP: --tdu-primary */

.tdu-wrapper {
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.tdu-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}

.tdu-header {
    background: var(--tdu-primary, #6996fa);
    color: #fff;
    padding: 20px;
}

.tdu-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
}

.tdu-header p {
    margin: 5px 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.tdu-body {
    padding: 20px;
}

/* Calculator Grid */
.tdu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.tdu-option-card {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.tdu-option-card:hover {
    background: #f9f9f9;
}

.tdu-option-card input {
    margin-right: 12px;
    transform: scale(1.2);
}

.tdu-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #eee;
    text-align: center;
}

.tdu-result-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

/* Inputs & Buttons */
.tdu-field {
    margin-bottom: 15px;
}

.tdu-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #444;
}

.tdu-field input, .tdu-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.tdu-btn {
    background: var(--tdu-primary, #6996fa);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s;
}

.tdu-btn:hover {
    opacity: 0.9;
}

.tdu-btn-outline {
    background: transparent;
    border: 2px solid #ccc;
    color: #555;
}

.tdu-btn-yes {
    background: #d63638; /* Emergency Red */
}

/* Triage */
.tdu-question {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.4;
}

.tdu-actions-row {
    display: flex;
    gap: 15px;
}

.tdu-alert {
    padding: 15px;
    background: #e3f2fd;
    border-left: 5px solid var(--tdu-primary, #6996fa);
    margin-bottom: 20px;
    border-radius: 4px;
}

.tdu-btn-link {
    background: none;
    border: none;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 15px;
    display: block;
    width: 100%;
}