/* Contract Modal Overlay */
.contract-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

/* Contract Modal Container */
.contract-modal {
    background: #FFFFFF;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Modal Header */
.contract-modal-header {
    padding: 24px 24px 20px;
}

.contract-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0;
    line-height: 1.4;
}

/* Modal Body */
.contract-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.contract-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Contract Item */
.contract-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid #E7E7E7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background-color: #FFFFFF;
}

.contract-item:hover {
    background-color: #F8F9FF;
}

.contract-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.contract-info {
    flex: 1;
}

.contract-customer-name {
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 4px;
}

.contract-code {
    font-size: 14px;
    font-weight: 500;
    color: #666666;
    margin-bottom: 4px;
}

.contract-address {
    font-size: 13px;
    color: #999999;
    line-height: 1.4;
}

/* Contract Check Icon - Radio Button Style */
.contract-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #CCCCCC;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
}

.contract-check svg {
    width: 20px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.contract-radio:checked ~ .contract-check {
    background-color: #4F75FB;
    border-color: #4F75FB;
}

.contract-radio:checked ~ .contract-check svg {
    opacity: 1;
}

.contract-item:has(.contract-radio:checked) {
    background-color: #F8F9FF;
    border-color: #4F75FB;
}

/* Modal Footer */
.contract-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Buttons */
.btn-contract-confirm,
.btn-contract-back {
    width: 100%;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-contract-confirm {
    background: #4F75FB;
    color: #FFFFFF;
}

.btn-contract-confirm:hover {
    background: #3D5FE3;
}

.btn-contract-confirm:active {
    background: #2E4FCF;
}

.btn-contract-confirm:disabled {
    background: #E7E7E7;
    color: #999999;
    cursor: not-allowed;
}

.btn-contract-back {
    background: transparent;
    color: #666666;
    border: 1px solid #E7E7E7;
}

.btn-contract-back:hover {
    background: #F5F5F5;
    border-color: #CCCCCC;
}

.btn-contract-back:active {
    background: #E7E7E7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .contract-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }

    .contract-modal-header {
        padding: 20px 16px 16px;
    }

    .contract-modal-title {
        font-size: 18px;
    }

    .contract-modal-body {
        padding: 16px;
    }

    .contract-item {
        padding: 12px;
    }

    .contract-customer-name {
        font-size: 15px;
    }

    .contract-code {
        font-size: 13px;
    }

    .contract-address {
        font-size: 12px;
    }

    .contract-modal-footer {
        padding: 12px 16px 20px;
    }

    .btn-contract-confirm,
    .btn-contract-back {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Animation */
@keyframes contractModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.contract-modal-overlay {
    animation: contractModalFadeIn 0.2s ease;
}

.contract-modal {
    animation: contractModalSlideUp 0.3s ease;
}
