/* ========================================
   Public Contract Signature Page Styles
   ======================================== */

/* Page Layout */
.signature-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #F8FAFC;
}

/* Header */
.signature-header {
    background: linear-gradient(135deg, #DC143C 0%, #1E3A8A 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.signature-header .navbar {
    padding: 1rem 2rem;
}

.signature-header .nav-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.signature-header .logo img {
    height: 60px;
    width: auto;
}

.signature-header .nav-title h1 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.signature-header .nav-title span {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-style: italic;
}

/* Main Content */
.signature-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
}

.signature-container {
    width: 100%;
    max-width: 800px;
}

/* State Containers */
.state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.loading-animation i {
    font-size: 3rem;
    color: #DC143C;
    margin-bottom: 1rem;
}

.error-icon i,
.success-icon i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.error-icon i {
    color: #EF4444;
}

.success-icon i,
.success-animation i {
    color: #10B981;
}

.success-animation i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.state-container h2 {
    font-size: 1.75rem;
    color: #1F2937;
    margin-bottom: 0.75rem;
}

.state-container p {
    color: #6B7280;
    margin-bottom: 0.5rem;
}

.success-note {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #9CA3AF;
}

/* Document Info Card */
.document-info-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #DC143C;
}

.document-info-card h2 {
    font-size: 1.5rem;
    color: #1F2937;
    margin: 0 0 0.5rem;
}

.document-info-card > p {
    color: #6B7280;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6B7280;
    font-size: 0.9rem;
}

.meta-item i {
    color: #DC143C;
}

.meta-item strong {
    color: #1F2937;
}

/* Signature Form Card */
.signature-form-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.signature-form-card h3 {
    font-size: 1.25rem;
    color: #1F2937;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signature-form-card h3 i {
    color: #DC143C;
}

.form-subtitle {
    color: #6B7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #DC143C;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.form-group input::placeholder {
    color: #9CA3AF;
}

/* Signature Canvas Section */
.signature-section {
    margin: 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
}

.signature-section h3 {
    margin-bottom: 0.5rem;
}

.canvas-container {
    background: #FAFAFA;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

#signatureCanvas {
    width: 100%;
    height: 200px;
    display: block;
    cursor: crosshair;
    touch-action: none;
}

.canvas-controls {
    display: flex;
    justify-content: flex-end;
}

/* Terms Checkbox */
.terms-group {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4B5563;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #DC143C;
    cursor: pointer;
}

/* Error Message */
.error-message {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #DC143C, #B91C1C);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #B91C1C, #991B1B);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid #D1D5DB;
    color: #374151;
}

.btn-outline:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.signature-footer {
    background: #1F2937;
    color: #9CA3AF;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .signature-main {
        padding: 1rem;
    }
    
    .document-info-card,
    .signature-form-card {
        padding: 1.5rem;
    }
    
    .document-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .signature-header .nav-content {
        padding: 0 1rem;
    }
    
    #signatureCanvas {
        height: 150px;
    }
    
    .state-container {
        padding: 2rem 1.5rem;
    }
    
    .state-container h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .signature-header .nav-title h1 {
        font-size: 1.25rem;
    }
    
    .document-info-card h2 {
        font-size: 1.25rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}
