/* style.css */

.rentvsbuycalc-calculator {
    max-width: 700px;
    margin: 30px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    font-family: sans-serif;
}

.rentvsbuycalc-calculator h3 {
    text-align: center;
    margin-bottom: 20px;
}

#rentvsbuycalc-form label {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.2;
}

#rentvsbuycalc-form input[type="number"],
#rentvsbuycalc-form input[type="text"],
#rentvsbuycalc-form input[type="email"],
#rentvsbuycalc-form select {
    width: 100%;
    padding: 6px 8px;
    margin-top: 5px;
    margin-bottom: 2px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

#rentvsbuycalc-form button {
    margin-top: 16px;
    padding: 10px 16px;
    background: #1c5087;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
}

#rentvsbuycalc-form button:hover {
    background: #004a8a;
}

#rentvsbuycalc-results {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#rentvsbuycalc-results.hidden {
    display: none;
}

#rentvsbuycalc-results h4 {
    margin-bottom: 10px;
}

#rvb-chart,
#rvb-line-chart {
    width: 100% !important;
    max-width: 100%;
    height: 400px !important;
    display: block;
}

#rvb-email {
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#rentvsbuycalc-results input[type="email"] {
    width: 100%;
    padding: 8px;
    margin-top: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#rentvsbuycalc-results button.rvb-button,
#rentvsbuycalc-results button {
    margin-top: 12px;
    padding: 10px 16px;
    background: #1c5087;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
}

#rentvsbuycalc-results button:hover {
    background: #004a8a;
    color: #fff;
}

#rentvsbuycalc-form label[for="first_name"],
#rentvsbuycalc-form label[for="last_name"],
#rentvsbuycalc-form label[for="email"],
#rentvsbuycalc-form label[for="phone"] {
    margin-top: 12px; /* space above the label */
    margin-bottom: 2px; /* tighten space below the label */
    font-weight: 600;
    line-height: 1.2;
}

.rvb-field {
    margin-top: 10px;
}

.rvb-field label {
    display: block;
    margin-bottom: 2px;
    font-weight: 600;
}

.rvb-field input {
    padding: 6px 8px;
    font-size: 14px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.rentvsbuycalc-attribution {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: #777;
    width: 100%; /* Ensure it spans the full width of its parent */
}

.rentvsbuycalc-attribution a {
    color: #777;
    text-decoration: none;
}

.rentvsbuycalc-attribution a:hover {
    color: #1c5087;
    text-decoration: underline;
}

/* Optional: Ensure the parent container also spans the full width if needed */
.rentvsbuycalc-calculator {
    max-width: 700px;
    margin: 30px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    font-family: sans-serif;
    width: 100%; /* Add this line if needed */
    box-sizing: border-box; /* Include padding and border in the width */
}

.rvb-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
