/* =============================================================
   Pure Staff Tools — Public Stylesheet
   Visual Builder Tool output styled to match the HTML template.
   ============================================================= */

/* --- Container --- */
.psdk-visual-builder-tool {
    max-width: 650px;
    margin: 40px auto;
    padding: 30px;
    background-color: #f0f5ff;
    border: 1px solid #0056b3;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

/* --- Headings inside tool --- */
.psdk-visual-builder-tool h1,
.psdk-visual-builder-tool h2 {
    color: #0056b3;
    text-align: center;
    margin-top: 0;
    margin-bottom: 5px;
}

.psdk-visual-builder-tool h3,
.psdk-visual-builder-tool h4 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
}

/* --- First heading acts as a title, add bottom border --- */
.psdk-builder-form > .psdk-step:first-child .psdk-form-group:first-child h2,
.psdk-builder-form > .psdk-step:first-child .psdk-form-group:first-child h3 {
    border-bottom: 3px solid #0056b3;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* --- Progress Bar --- */
.psdk-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    position: relative;
}

.psdk-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

/* Connecting line between steps */
.psdk-progress-step::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: #ccc;
    z-index: 0;
    transition: background 0.3s;
}

.psdk-progress-step:last-child::after {
    display: none;
}

.psdk-progress-step.active::after {
    background: #0056b3;
}

/* Circle */
.psdk-step-circle {
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    background: #ccc;
    color: white;
    display: inline-block;
    font-weight: bold;
    position: relative;
    z-index: 1;
    transition: background 0.3s;
}

.psdk-progress-step.active .psdk-step-circle {
    background: #0056b3;
}

/* Label below circle */
.psdk-step-label {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

.psdk-progress-step.active .psdk-step-label {
    color: #0056b3;
    font-weight: bold;
}

/* --- Steps --- */
.psdk-step {
    display: none;
}

.psdk-step.active {
    display: block;
    animation: psdk-fadeIn 0.5s ease;
}

@keyframes psdk-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --- Form Groups --- */
.psdk-form-group {
    margin-bottom: 20px;
}

.psdk-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

/* --- Inputs & Selects --- */
.psdk-visual-builder-tool input[type="text"],
.psdk-visual-builder-tool input[type="number"],
.psdk-visual-builder-tool input[type="email"],
.psdk-visual-builder-tool input[type="date"],
.psdk-visual-builder-tool select,
.psdk-visual-builder-tool textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.1em;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.psdk-visual-builder-tool input[type="range"] {
    width: 100%;
    padding: 6px 0;
    cursor: pointer;
}

.psdk-visual-builder-tool input:focus,
.psdk-visual-builder-tool select:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.2);
}

/* --- Radio / Checkbox Options --- */
.psdk-check-option {
    margin-bottom: 8px;
}

.psdk-check-option label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.psdk-options-container {
    padding: 5px 0;
}

/* --- Paragraphs / Disclaimers --- */
.psdk-visual-builder-tool p {
    color: #555;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* --- Navigation Buttons --- */
.psdk-step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}

.psdk-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    background: #007cba;
    color: white;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.psdk-btn:hover {
    background: #005a87;
    color: white;
}

.psdk-btn-next {
    margin-left: auto;
}

.psdk-btn-prev {
    background: #6c757d;
}

.psdk-btn-prev:hover {
    background: #5a6268;
}

/* Submit button — green, like the CTA in the HTML version */
.psdk-builder-form button[type="submit"].psdk-btn {
    background: #326533;
}

.psdk-builder-form button[type="submit"].psdk-btn:hover {
    background: #274d28;
}

.psdk-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* --- Calculation Result Block --- */
.psdk-calc-result {
    background: #e8f5fa;
    border: 1px solid #bce0f5;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 15px;
}

.psdk-calc-result label {
    display: block;
    font-size: 0.8em;
    font-weight: bold;
    color: #005c87;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.psdk-calc-display {
    font-size: 26px;
    font-weight: bold;
    color: #005c87;
    font-family: 'Courier New', Courier, monospace;
}

/* --- Success Message --- */
.psdk-success-message {
    text-align: center;
    padding: 30px 20px;
}

.psdk-success-message h3 {
    color: #326533;
    font-size: 1.6em;
}

.psdk-success-message p {
    color: #555;
    font-size: 1.1em;
}

/* --- Results Table (tw_results_table element) --- */
.psdk-results-headline {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
}

.psdk-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.psdk-results-table th,
.psdk-results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.psdk-results-table th {
    background-color: #e9ecef;
    font-weight: bold;
}

.psdk-results-table .tw_label-cell small {
    display: block;
    color: #666;
    font-weight: normal;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.psdk-results-table .tw_value-cell {
    text-align: right;
    font-weight: bold;
    font-size: 1.2em;
    font-family: 'Courier New', Courier, monospace;
}

.psdk-results-table tr.total-row td {
    background-color: #0056b3;
    color: white;
    font-size: 1.3em;
    border-bottom: none;
}

.psdk-results-table tr.total-row small {
    color: rgba(255, 255, 255, 0.8);
}

/* --- CTA Button (Contact Us link) --- */
.psdk-cta-btn {
    display: block;
    text-align: center;
    background-color: #326533;
    color: white;
    padding: 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
    margin-top: 30px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.psdk-cta-btn:hover {
    background-color: #274d28;
    color: white;
}

/* --- Restart Button --- */
.psdk-restart-btn {
    display: block;
    width: 100%;
    margin-top: 15px;
    background-color: #6c757d;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.psdk-restart-btn:hover {
    background-color: #5a6268;
}
