/* Common Forms Styles */
/* Used by: What Is My Alarm Company Worth, Concierge Form, Alarm Contract */

/* Page Layout */
.alarm-worth-page {
    padding: 40px 0;
}

.page-title {
    color: #960030;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 14px;
    margin-bottom: 30px;
    color: #960030;
    font-weight: bold;
}

/* Form Headers */
.form-header {
    margin: 25px 0 15px 0;
    padding: 10px;
    background-color: #999999;
    color: #fff;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
}

/* Buttons - Black with animated shine effect, red on hover */
.kk-btn {
    position: relative;
    display: inline-block;
    border: 1px solid var(--kk-brand-black, #000000);
    border-radius: 0;
    background-color: var(--kk-brand-black, #000000);
    padding: 12px 40px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
    text-decoration: none !important;
    color: #fff !important;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
    overflow: hidden;
}

.kk-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -140%;
    width: 60%;
    height: 100%;
    background: rgba(255, 255, 255, 0.18);
    transform: skewX(-20deg);
    transition: left 360ms ease;
    pointer-events: none;
}

.kk-btn:hover,
.kk-btn:focus {
    background-color: var(--kk-brand-red, #9A0A2E);
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.kk-btn:hover::after,
.kk-btn:focus::after {
    left: 180%;
}

.kk-btn:active {
    transform: translateY(0);
}

.kk-btn:disabled,
.kk-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.kk-btn--lg {
    padding: 15px 50px;
    font-size: 20px;
}

.kk-btn--md {
    font-size: 16px;
}

/* Main Page - Plan Selection */
.alarm-worth-page .page-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.plan-option {
    background: #f5f5f5;
    border: 2px solid #960030;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    transition: box-shadow 0.3s ease;
}

.plan-option:hover {
    box-shadow: 0 4px 12px rgba(150, 0, 48, 0.2);
}

.plan-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #960030;
    padding-bottom: 15px;
}

.plan-header h2 {
    color: #960030;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.plan-price {
    color: #960030;
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.plan-description {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.plan-features {
    list-style-type: disc;
    padding-left: 30px;
    margin: 20px 0;
    text-align: left;
}

.plan-features li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Payment Card Types - Legacy (kept for compatibility) */
.card-type-selection {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.card-type-option {
    cursor: pointer;
}

.card-type-option input[type="radio"] {
    margin-right: 8px;
}

.card-type-label {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
}

.card-type-option input[type="radio"]:checked + .card-type-label {
    border-color: #960030;
    background-color: #fff5f7;
}

.card-icon {
    font-size: 24px;
    margin-right: 8px;
}

/* Payment Card Types - Modern */
.payment-card-types {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.payment-card-option {
    cursor: pointer;
    margin: 0;
}

.payment-card-option input[type="radio"] {
    display: none;
}

.payment-card-box {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    transition: all 0.2s ease;
    min-width: 120px;
}

.payment-card-box:hover {
    border-color: #960030;
    box-shadow: 0 2px 4px rgba(150, 0, 48, 0.1);
}

.payment-card-option input[type="radio"]:checked + .payment-card-box {
    border-color: #960030;
    background-color: #fff5f7;
    box-shadow: 0 2px 8px rgba(150, 0, 48, 0.15);
}

.payment-card-icon {
    font-size: 20px;
    margin-right: 8px;
}

.payment-card-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Radio Buttons Styling */
.form-check {
    margin-bottom: 8px;
    padding-left: 0;
}

.form-check-input {
    margin-top: 0.25rem;
    margin-right: 8px;
    margin-left: 0;
    position: relative;
    vertical-align: middle;
}

.form-check-label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    margin-left: 0;
    vertical-align: middle;
    cursor: pointer;
}

/* Radio Inline Group - All Vertical */
.radio-inline-group {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 0 0 0 20px;
}

/* Short options class (kept for compatibility) */
.radio-inline-group.short-options {
    flex-direction: column;
    gap: 8px;
}

.radio-inline-group .form-check {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    min-height: 20px;
    padding-left: 0;
}

.radio-inline-group .form-check-input {
    margin-right: 8px;
    margin-left: 0;
    flex-shrink: 0;
}

.radio-inline-group .form-check-label {
    padding: 0;
    font-size: 14px;
    margin-left: 0;
}

/* Conditional Fields Below Radio Buttons */
.radio-conditional-field {
    margin-top: 15px;
    margin-bottom: 10px;
    padding-left: 0;
    clear: both;
}

.radio-conditional-field .form-control {
    max-width: 500px;
}

/* Form Groups Spacing */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

/* Form Container */
.alarm-worth-form,
.payment-form {
    overflow-x: hidden;
    background: #FAFAFA;
    padding: 25px;
    border: 1px solid #ccc;
    border-radius: 0;
    box-shadow: none;
}

.alarm-worth-form .form-group,
.payment-form .form-group {
    padding: 0;
}

/* Container Padding */
.alarm-worth-page .col-md-10 {
    padding-left: 25px;
    padding-right: 25px;
}

/* Label Spacing */
.form-group > label {
    margin-bottom: 10px;
    display: block;
}

/* Input Groups with Dollar Signs */
.input-group-prepend .input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Text Styling */
.text-muted {
    color: #6c757d !important;
}

small.form-text {
    display: block;
    margin-top: 0.25rem;
}

/* reCAPTCHA */
.recaptcha-wrapper .g-recaptcha {
    display: inline-block;
}

/* Success Page */
.success-message {
    background: #ffffff;
    border: 3px solid #960030;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.success-header {
    background: #960030;
    color: #ffffff;
    padding: 30px;
}

.success-header h1 {
    color: #fff;
    font-size: 36px;
    margin: 0;
    font-weight: bold;
}

.success-body {
    padding: 40px 30px;
    color: #333;
}

.success-body p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.order-id {
    color: #960030;
    font-size: 18px;
    margin: 20px 0;
}

.contact-info {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 5px;
    margin: 30px 0;
    border-left: 4px solid #960030;
}

.contact-label {
    font-weight: bold;
    color: #960030;
}

.email-button {
    display: inline-block;
    background: var(--kk-brand-black, #000000);
    color: white !important;
    padding: 8px 20px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0;
    margin-left: 10px;
    transition: background-color 0.3s ease, transform 180ms ease;
    border: 1px solid var(--kk-brand-black, #000000);
}

.email-button:hover {
    background: var(--kk-brand-red, #9A0A2E);
    color: white !important;
    text-decoration: none;
    transform: translateY(-1px);
}

.kk-btn--md {
    font-size: 16px;
}

/* Important Note Box on Success Page */
.important-note {
    background: #fff3cd !important;
    border: 1px solid #ffc107 !important;
    border-radius: 5px;
    color: #856404 !important;
}

.important-note p {
    color: #856404 !important;
    margin-bottom: 10px;
}

.important-note strong {
    color: #856404 !important;
}

.important-note p:last-child {
    margin-bottom: 0;
}

/* Contract Confirmation - override white text for important note */
.contract-confirmation .important-note {
    color: #856404 !important;
}

.contract-confirmation .important-note p {
    color: #856404 !important;
}

.contract-confirmation .important-note strong {
    color: #856404 !important;
}

/* Contract Confirmation (Red Background) */
.contract-confirmation {
    color: #FFF !important;
}

.contract-confirmation h1 {
    color: #FFF !important;
}

.contract-confirmation h4 {
    color: #FFF !important;
    margin-bottom: 15px;
}

.contract-confirmation p {
    color: #FFF !important;
}

.contract-confirmation .list-unstyled {
    color: #FFF !important;
}

.contract-confirmation .list-unstyled li {
    color: #FFF !important;
    margin-bottom: 8px;
}

.contract-confirmation strong {
    color: #FFF !important;
}

.contract-confirmation a {
    color: #960030 !important;
    background: #FFF !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    text-decoration: none !important;
}

/* Input Size Classes (Legacy compatibility) */
.input-sm {
    width: 100px !important;
    display: inline-block !important;
}

.input-med {
    width: 250px !important;
    display: inline-block !important;
}

.input-spaced {
    margin-left: 10px !important;
}

/* Select Field */
.select-field {
    display: inline-block !important;
    width: auto !important;
    min-width: 150px;
}

/* Form Spacing */
.form-group-spacing-after {
    margin-bottom: 40px !important;
}

/* Terms Checkboxes */
.form-terms fieldset p {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.form-terms fieldset input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    flex-shrink: 0;
}

.form-terms fieldset label {
    margin: 0;
    flex: 1;
}

/* Payment Plan Radio Buttons */
fieldset p {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

fieldset input[type="radio"] {
    margin-right: 10px;
    margin-top: 3px;
    flex-shrink: 0;
}

fieldset label {
    margin: 0;
    flex: 1;
}

/* Typography Classes */
.font-16 {
    font-size: 16px;
}

/* Collect.js Fields Styling */
.collect-js-field {
    height: calc(2.25rem + 2px);
    padding: 0;
    font-size: 1rem;
    line-height: 1.5;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out;
    position: relative;
    overflow: hidden; /* Hide internal validation messages */
    max-height: calc(2.25rem + 2px); /* Strict height to clip overflow */
}

.collect-js-field iframe {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

.collect-js-field.is-invalid {
    border-color: #dc3545;
}

.collect-js-field.is-valid {
    border-color: #28a745;
}

.collect-js-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Sticky Plan Block */
.sticky-plan-block {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #960030 0%, #7a0026 100%);
    color: #ffffff;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    opacity: 0;
}

.sticky-plan-block.visible {
    transform: translateY(0);
    opacity: 1;
}

.sticky-plan-content {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 16px;
}

.sticky-plan-label {
    font-weight: normal;
    color: rgba(255, 255, 255, 0.9);
}

.sticky-plan-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
}

.sticky-plan-price {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
}

/* Add padding to body when sticky is visible to prevent content jump */
body.sticky-plan-active {
    padding-top: 0;
}

@media (max-width: 768px) {
    .sticky-plan-block {
        padding: 12px 15px;
    }
    
    .sticky-plan-content {
        font-size: 14px;
        gap: 8px;
    }
    
    .sticky-plan-price {
        font-size: 16px;
    }
}
