/* Alarm Contract Page Styles */

/* Order Information Section */
.order-info-section {
    background: #EEEEEE;
    padding: 0;
    margin: 30px 0;
    border-radius: 0;
}

.order-info-header {
    background: #999999;
    color: #960030;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    margin: 0;
}

.order-info-section .row {
    padding: 30px;
}

.order-info-section .contact-info-text {
    font-size: 14px;
    line-height: 1.8;
    margin-top: 0;
    padding-top: 10px;
}

.order-info-section .contact-info-text a {
    color: #0066CC;
    text-decoration: none;
}

.order-info-section .contact-info-text a:hover {
    text-decoration: underline;
}

/* Contact Administrator Block - ensure it stays in place */
.block-contact-administrator {
    /* Remove any flex or positioning that breaks Bootstrap grid */
}

.container-photo {
    margin: 20px 0;
}

.container-photo img {
    max-width: 200px;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.administrator-phone-num {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

.contract-admin-photo {
    max-width: 200px;
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 0 auto 15px auto;
    display: block;
}

.admin-name {
    font-size: 18px;
    margin: 10px 0;
    color: #333;
}

.admin-divider {
    width: 60%;
    margin: 10px auto;
    border: 0;
    border-top: 2px solid #960030;
}

.admin-phone {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

/* Contracts Table */
.contracts-table-wrapper {
    margin-bottom: 30px;
}

.contract-category-header {
    background: #960030;
    color: #FFF;
    padding: 10px 15px;
    margin: 20px 0 0 0;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

.table-contracts {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table-contracts thead th {
    background: #960030;
    color: #FFF;
    padding: 10px;
    font-weight: normal;
    text-align: left;
    border: 1px solid #960030;
}

.table-contracts tbody td {
    padding: 8px 10px;
    border: 1px solid #CCC;
    vertical-align: middle;
}

.table-contracts tbody tr.row-odd {
    background: #FFF;
}

.table-contracts tbody tr.row-even {
    background: #EEE;
}

.table-contracts tbody tr:hover {
    background: #F5F5F5;
}

.table-contracts .contract-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.table-contracts label {
    cursor: pointer;
    margin-bottom: 0;
}

.table-contracts td ol {
    list-style: decimal;
    padding-left: 1.5em;
    margin: 0;
}

.table-contracts td ul {
    list-style: disc;
    padding-left: 1.5em;
    margin: 0;
}

/* Payment Section - Legacy Style */
.payment-section-wrapper {
    margin: 30px 0;
}

.payment-section-header {
    background: #999999;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: normal;
    text-align: center;
    padding: 10px;
    margin: 0 0 20px 0;
}

.form-label-payment {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.payment-inputs {
    background: #FAFAFA;
    padding: 10px;
    margin-bottom: 10px;
}

.payment-card-radios {
    background: #FAFAFA;
    padding: 10px;
}

.radio-inline {
    display: inline-block;
    margin-right: 20px;
    cursor: pointer;
}

.radio-inline input[type="radio"] {
    margin-right: 5px;
}

.form-input-inline {
    border: 1px solid #CCC;
    padding: 4px 6px;
    font-size: 14px;
}

.form-input-inline:focus {
    outline: none;
    border-color: #960030;
}

.form-input-inline.is-invalid {
    border-color: #DC3545;
}

/* Collect.js Fields Styling - align with forms.css */
.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;
}

.collect-js-field iframe {
    border: none !important;
    padding: 0 !important;
    margin: 0 !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;
}

/* Remove old payment card types styles */
.payment-card-types {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.payment-card-types .card-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid #CCC;
    border-radius: 5px;
    background: #FFF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-card-types .card-box:hover {
    border-color: #960030;
    background: #FFF5F8;
}

.payment-card-types .card-box.selected {
    border-color: #960030;
    background: #960030;
    color: #FFF;
}

.payment-card-types .card-box input[type="radio"] {
    margin: 0;
}

.payment-card-types .card-box label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.payment-card-types .card-box.selected label {
    color: #FFF;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-info {
    background: #D9EDF7;
    border-color: #BCE8F1;
    color: #31708F;
}

.alert-warning {
    background: #FCF8E3;
    border-color: #FAEBCC;
    color: #8A6D3B;
}

.alert-success {
    background: #DFF0D8;
    border-color: #D6E9C6;
    color: #3C763D;
}

.alert-danger {
    background: #F2DEDE;
    border-color: #EBCCD1;
    color: #A94442;
}

/* Fieldsets for radio/checkbox groups */
fieldset {
    border: none;
    padding: 0;
    margin: 0 0 20px 0;
}

fieldset legend {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    padding: 0;
    width: auto;
}

fieldset p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    line-height: 1.6;
}

fieldset input[type="checkbox"],
fieldset input[type="radio"] {
    margin-top: 4px;
    flex-shrink: 0;
}

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

/* Form Check styles for radio buttons */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.form-check-input {
    margin-top: 4px;
    flex-shrink: 0;
}

.form-check-label {
    cursor: pointer;
    margin: 0;
    flex: 1;
}

/* Badge for NEW contracts */
.badge {
    display: inline-block;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 3px;
}

.badge-danger {
    background: #D9534F;
    color: #FFF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .table-contracts {
        font-size: 14px;
    }
    
    .table-contracts thead {
        display: none;
    }
    
    .table-contracts tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 2px solid #960030;
    }
    
    .table-contracts tbody td {
        display: block;
        text-align: left !important;
        padding: 10px;
        border: none;
        border-bottom: 1px solid #DDD;
    }
    
    .table-contracts tbody td:last-child {
        border-bottom: none;
    }
    
    .table-contracts tbody td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
    }
    
    .payment-card-types {
        flex-direction: column;
    }
    
    .payment-card-types .card-box {
        width: 100%;
    }
}

/* ==========================================================================
   K&K Lawyer Concierge Program block
   Panel + option rows (Order Information idiom), billing choice as buttons.
   ========================================================================== */
.concierge {
    background: #EEEEEE;
    margin: 30px 0;
}

.concierge__header {
    background: #999999;
    color: #960030;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    margin: 0;
}

.concierge__header small {
    display: block;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: normal;
    margin-top: 2px;
}

.concierge__options {
    padding: 20px;
    border: 0;
    margin: 0;
}

/* option rows */
.concierge__options .concierge-option {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
    background: #FFFFFF;
    border: 1px solid #CCCCCC;
    border-left: 4px solid transparent;
    padding: 12px 15px;
    margin: -1px 0 0;
    cursor: pointer;
    line-height: 1.5;
    transition: background-color 0.2s, border-left-color 0.2s;
}

.concierge__options .concierge-option:first-of-type {
    margin-top: 0;
}

.concierge__options .concierge-option:hover {
    background: #F5F5F5;
}

.concierge__options .concierge-option.is-selected {
    background: #FFF5F8;
    border-left-color: #960030;
}

.concierge__options .concierge-option input[type="radio"] {
    margin: 5px 0 0;
    flex-shrink: 0;
}

.concierge-option__text {
    flex: 1 1 260px;
}

/* discount marker: outlined chip, fills only on the selected row */
.concierge-discount {
    flex-shrink: 0;
    align-self: center;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #960030;
    background: #FFFFFF;
    border: 1px solid #960030;
    border-radius: 3px;
    padding: 5px 8px;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}

.concierge-option.is-selected .concierge-discount {
    background: #960030;
    color: #FFFFFF;
}

/* billing row: collapsible (0fr -> 1fr animates height without JS measuring) */
.concierge .subagreement {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    margin-top: 0;
    transition: grid-template-rows 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.22s ease,
                margin-top 0.32s,
                visibility 0s linear 0.32s;
}

.concierge .subagreement.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
    margin-top: -1px;
    transition-delay: 0s;
}

.subagreement__body {
    min-height: 0;
    overflow: hidden;
}

.subagreement__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    background: #F5F5F5;
    border: 1px solid #CCCCCC;
    border-left: 4px solid #960030;
    padding: 12px 15px 12px 42px;
    transform: translateY(-6px);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.subagreement.is-open .subagreement__inner {
    transform: translateY(0);
}

.subagreement__label {
    font-weight: bold;
    margin-right: 6px;
}

.subagreement__error {
    flex-basis: 100%;
}

/* billing buttons */
.concierge__options .concierge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 8px 16px;
    margin: 0;
    border: 2px solid #CCCCCC;
    border-radius: 5px;
    background: #FFFFFF;
    color: #333333;
    font-weight: normal;
    cursor: pointer;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease,
                border-color 0.2s, background-color 0.2s, color 0.2s;
}

.subagreement.is-open .concierge-pill {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.12s;
}

.subagreement.is-open .concierge-pill + .concierge-pill {
    transition-delay: 0.18s;
}

.concierge__options .concierge-pill:hover {
    border-color: #960030;
}

.concierge__options .concierge-pill.is-selected {
    border-color: #960030;
    background: #960030;
    color: #FFFFFF;
    animation: concierge-pill-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.concierge__options .concierge-pill input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}

.concierge__options input[type="radio"]:focus-visible {
    outline: 2px solid #960030;
    outline-offset: 2px;
}

@keyframes concierge-pill-pop {
    0%   { transform: scale(0.96); }
    60%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   Money odometer: each digit is a reel that spins to its target
   (used by #contracts-total and #total_amount_display)
   ========================================================================== */
.odometer {
    display: inline-flex;
    align-items: baseline;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.total-display.odometer {
    display: flex;
    background: #e9ecef;
    color: #495057;
}

.odometer__reel {
    display: inline-block;
    height: 1em;
    line-height: 1em;
    overflow: hidden;
    vertical-align: baseline;
}

.odometer__strip {
    display: block;
    will-change: transform;
}

.odometer__strip span {
    display: block;
    height: 1em;
    line-height: 1em;
    text-align: center;
}

.odometer__reel.is-spinning .odometer__strip {
    filter: blur(0.3px);
}

@media (prefers-reduced-motion: reduce) {
    .concierge .subagreement,
    .subagreement__inner,
    .concierge__options .concierge-option,
    .concierge-discount,
    .concierge__options .concierge-pill,
    .odometer__strip {
        transition: none !important;
        animation: none !important;
    }
}
