/* =========================================================
   R&D Credit Estimate Widget – Styles
   ========================================================= */

/* Wrapper */
.rd-credit-form-wrap {
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 40px 44px;
    max-width: 880px;
    margin: 0 auto;
    font-family: inherit;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
    box-sizing: border-box;
}

/* Header */
.rd-form-header {
    text-align: center;
    margin-bottom: 28px;
}
.rd-form-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #C8922A;
    margin: 0 0 8px;
    line-height: 1.3;
}
.rd-form-subtitle {
    font-size: .93rem;
    color: #6B7280;
    margin: 0;
}

/* ── Step Indicator ── */
.rd-steps-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
    gap: 0;
}
.rd-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.rd-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #D1D5DB;
    color: #9CA3AF;
    font-size: .85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s;
    background: #fff;
    flex-shrink: 0;
}
.rd-step-circle.active {
    border-color: #C8922A;
    color: #C8922A;
}
.rd-step-circle.done {
    background: #C8922A;
    border-color: #C8922A;
    color: #fff;
}
.rd-step-label {
    font-size: .875rem;
    color: #6B7280;
    font-weight: 500;
    white-space: nowrap;
}
.rd-step.active .rd-step-label {
    color: #111827;
    font-weight: 600;
}
.rd-step-line {
    flex: 1;
    height: 2px;
    background: #E5E7EB;
    margin: 0 10px;
    transition: background .3s;
}
.rd-step-line.done {
    background: #C8922A;
}

/* ── Panels ── */
.rd-step-panel {
    display: none;
    animation: rdFadeIn .25s ease;
}
.rd-step-panel.active {
    display: block;
}
.rd-success-panel {
    text-align: center;
    padding: 32px 0;
}
.rd-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #D1FAE5;
    color: #065F46;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.rd-success-message {
    font-size: 1rem;
    color: #374151;
    margin: 0;
}

@keyframes rdFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Grid ── */
.rd-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 18px;
    margin-bottom: 24px;
}
.rd-form-grid--3col {
    grid-template-columns: 1fr 1fr 1fr;
}
.rd-form-grid--full .rd-field-group {
    grid-column: 1 / -1;
}

/* ── Field ── */
.rd-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rd-label {
    font-size: 12px;
    font-weight: 600;
    color: #18181B;
    letter-spacing: .01em;
}
.rd-required {
    color: #EF4444;
    margin-left: 2px;
}

/* Inputs / Selects / Textarea */
.rd-form-control {
    width: 100%;
	height: 36px;
    padding: 4px 14px;
    font-size: .9rem;
    color: #111827;
    background: #fff;
    border: 1.5px solid #E4E4E7;
    border-radius: 6px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}
.rd-form-control::placeholder { color: #9CA3AF; }
.rd-form-control:focus {
    border-color: #C8922A;
    box-shadow: 0 0 0 3px rgba(200,146,42,.15);
}
.rd-form-control.rd-error {
    border-color: #EF4444;
}
.rd-textarea {
    resize: vertical;
    min-height: 96px;
}

/* Select wrapper (custom arrow) */
.rd-select-wrap {
    position: relative;
}
.rd-select-wrap::after {
    content: '';
    pointer-events: none;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #6B7280;
}
.rd-select-wrap .rd-form-control {
    padding-right: 36px;
    cursor: pointer;
}

/* ── Buttons ── */
.rd-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}
.rd-btn-row--single {
    justify-content: flex-end;
}
.rd-btn-primary,
.rd-btn-secondary {
    padding: 12px 28px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}
.rd-btn-primary {
    background: #CBA052;
    color: #fff !important;
    border-color: #CBA052;
    flex: 1;
    justify-content: center;
}
.rd-btn-primary:hover {
    background: transparent;
	color: #CBA052;
    border-color: #CBA052;
}
.rd-btn-primary:disabled {
    opacity: .7;
    cursor: not-allowed;
}
.rd-btn-secondary {
    background: transparent !important;
    color: #18181B !important;
    border-color: #E4E4E7 !important;
    flex-shrink: 0;
    min-width: 110px;
    justify-content: center;
}
.rd-btn-secondary:hover {
    background: #CBA052 !important;
	color: #fff !important;
    border-color: #CBA052 !important;
}

/* Validation error text */
.rd-field-error {
    font-size: .78rem;
    color: #EF4444;
    margin-top: 4px;
}

/* Privacy note */
.rd-privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
	line-height: 16px;
    color: #9CA3AF;
    margin: 20px 0 0;
    text-align: center;
}
.rd-privacy-note svg {
    flex-shrink: 0;
    color: #9CA3AF;
}

.rd-result-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.rd-result-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.rd-result-box {
    position: relative;
    max-width: 1000px;
    margin: 60px auto;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.rd-result-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 22px;
    cursor: pointer;
}

.rd-result-title {
	font-size: 18px;
	line-height: 28px;
	font-weight: 600;
    color: #c8922a;
    margin-bottom: 20px;
}

.rd-result-card {
    background: #243b63;
    color: #fff;
    padding: 25px;
    border-radius: 10px;
}

.rd-result-amount {
    font-size: 32px;
    margin-bottom: 20px;
}

.rd-result-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}

.rd-result-meta div span {
    display: block;
    opacity: 0.8;
}

.rd-result-note {
    margin: 15px 0;
    color: #666;
}

.rd-result-btn {
    display: block;
    background: #CBA052;
    color: #fff !important;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 10px;
}

.rd-result-privacy {
    font-size: 12px;
    margin-top: 10px;
    color: #777;
}



/* ── Responsive ── */
@media (max-width: 640px) {
    .rd-credit-form-wrap {
        padding: 28px 20px;
    }
    .rd-form-grid,
    .rd-form-grid--3col {
        grid-template-columns: 1fr;
    }
    .rd-step-label { display: none; }
    .rd-btn-row { flex-direction: column-reverse; }
    .rd-btn-primary, .rd-btn-secondary { width: 100%; }
	.rd-form-title{
		font-size: 18px;
		line-height: 24px;
	}
	.rd-form-subtitle{
		font-size: 14px;
		line-height: 18px;
	}
	.rd-result-box h2{
		font-size: 28px !important;
		 margin-bottom: 15px;
	}
	.rd-result-title {
		font-size: 15px;
		line-height: 25px;
		margin-bottom: 10px;
	}
	.rd-result-card{
		padding: 18px;
	}
	.rd-result-note{
		margin: 8px 0;
		color: #666;
		font-size: 14px;
		margin-bottom: 12px;
		margin-block-end: 12px !important;
	}
	.rd-result-btn{
		padding: 8px;
		font-size: 14px;
	}
 .rd-result-privacy {
    color: #777;
    line-height: 16px;
    margin: 10px 0;
    margin-block-end: 10px !important;
}
	.rd-result-meta{
		line-height: 22px;
	}
}
/* Responsive */
@media (max-width: 600px) {
    .rd-result-meta {
        flex-direction: column;
        gap: 15px;
    }
}