/**
 * Agreement Manager - Frontend Styles
 */

.agreement-manager-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.agreement-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.agreement-header h1 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
}

.agreement-header p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.agreement-form {
    position: relative;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.form-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #00bfa5;
    box-shadow: 0 0 0 3px rgba(0, 191, 165, 0.1);
}

.pre-filled-value {
    padding: 12px 15px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 15px;
    color: #495057;
    min-height: 45px;
    display: flex;
    align-items: center;
}

.signature-group {
    margin-top: 30px;
}

.signature-wrapper {
    position: relative;
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
}

.signature-pad {
    display: block;
    width: 100%;
    height: 150px;
    cursor: crosshair;
    border-radius: 4px;
    touch-action: none;
}

.clear-signature-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-signature-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.signature-note {
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
    font-style: italic;
}

.company-signature {
    background: #ffffff;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-signature img {
    max-width: 250px;
    max-height: 120px;
    display: block;
}

.signature-placeholder {
    padding: 30px;
    text-align: center;
}

.terms-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    border: 1px solid #e9ecef;
}

.terms-section h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
}

.terms-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #495057;
}

.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    cursor: pointer;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.terms-checkbox:hover {
    background: #f8f9fa;
}

.terms-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.btn {
    padding: 14px 35px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #00bfa5, #00897b);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 191, 165, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00897b, #00695c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 165, 0.4);
}

.btn-secondary {
    background: #2c3e50;
    color: white;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

.btn-secondary:hover {
    background: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.4);
}

.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00bfa5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
}

.success-message {
    text-align: center;
    padding: 60px 40px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #00bfa5;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #00bfa5, #00897b);
    color: white;
    font-size: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 8px 20px rgba(0, 191, 165, 0.3);
}

.success-message h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.success-message p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .agreement-manager-container {
        padding: 20px;
        margin: 20px;
    }
    
    .agreement-header h1 {
        font-size: 24px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    .agreement-manager-container,
    .agreement-manager-container * {
        visibility: visible;
    }
    
    .agreement-manager-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
    }
    
    .form-actions,
    .terms-checkbox,
    .clear-signature-btn,
    .signature-note {
        display: none !important;
    }
}