/* Contract Form Styles */
.contract-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.contract-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease-out;
}

.contract-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.contract-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.contract-body {
    padding: 30px;
}

.plan-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #e9ecef;
}

.plan-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
}

.plan-info p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

.plan-price {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #28a745;
    min-width: 150px;
}

.plan-price .price-amount {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 5px;
}

.plan-price .price-note {
    font-size: 0.9rem;
    color: #666;
}

.contract-form {
    max-width: 100%;
}

.form-section {
    margin-bottom: 35px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 4px solid #667eea;
}

.form-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3 i {
    color: #667eea;
    font-size: 1.1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.contract-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

.btn-cancel,
.btn-continue {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-continue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

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

/* Success/Error Messages */
.contract-success-message,
.contract-error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    animation: slideInUp 0.3s ease-out;
}

.success-content .success-icon,
.error-content .error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.success-content .success-icon {
    color: #28a745;
}

.error-content .error-icon {
    color: #dc3545;
}

.success-content h3,
.error-content h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.success-content p,
.error-content p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.5;
}

.error-close {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px auto 0;
}

.error-close:hover {
    background: #c82333;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Contract Form Responsive */
@media (max-width: 768px) {
    .contract-modal-content {
        width: 98%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .contract-header {
        padding: 20px;
    }
    
    .contract-header h2 {
        font-size: 1.5rem;
    }
    
    .contract-body {
        padding: 20px;
    }
    
    .plan-summary {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-section {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .contract-actions {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-continue {
        width: 100%;
        justify-content: center;
    }
}
