/* 
 * Contract Signing Interface Styles
 * Provides styling for the document signing process
 */

/* Contract Signing Container */
.contract-signing-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.contract-signing-container .contract-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.contract-signing-container .contract-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
}

/* Parties Section */
.contract-parties {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.party {
    flex: 1;
    text-align: center;
}

.party-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.party-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.75rem;
}

.party-signature {
    font-size: 0.875rem;
}

.signature-pending {
    color: #856404;
}

.signature-pending i {
    margin-right: 0.25rem;
}

.signature-complete {
    color: #155724;
}

.signature-complete i {
    margin-right: 0.25rem;
    color: #28a745;
}

.party-arrow {
    color: #dee2e6;
    font-size: 1.5rem;
}

/* Contract Document */
.contract-document {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e9ecef;
}

.contract-document h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #000;
}

.contract-document h3 i {
    margin-right: 0.5rem;
    color: #6c757d;
}

.contract-download {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #000;
    text-decoration: none;
    transition: all 0.2s;
}

.contract-download:hover {
    background: #e9ecef;
    border-color: #000;
}

.contract-download i:first-child {
    font-size: 1.5rem;
    color: #dc3545;
}

.contract-download span {
    flex: 1;
    font-weight: 500;
}

.contract-text {
    padding: 1rem;
    background: #fff;
    border: 1px solid #dee2e6;
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Signature Section */
.signature-section {
    padding: 2rem;
    background: #fff;
    border: 2px solid #000;
    margin-bottom: 2rem;
}

.signature-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.signature-section h3 i {
    margin-right: 0.5rem;
}

.signature-intro {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.signature-form .form-group {
    margin-bottom: 1.5rem;
}

.signature-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.signature-form input[type="text"] {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid #dee2e6;
}

.signature-form input[type="text"]:focus {
    outline: none;
    border-color: #000;
}

.signature-agreement {
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
}

.checkbox-label span {
    font-size: 0.875rem;
    color: #495057;
    line-height: 1.5;
}

.signature-section .btn-lg {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

.signature-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    font-size: 0.8125rem;
    color: #6c757d;
}

.signature-note i {
    margin-right: 0.5rem;
}

/* Already Signed Section */
.already-signed-section {
    padding: 2rem;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    text-align: center;
    margin-bottom: 2rem;
}

.signed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

.signed-badge i {
    font-size: 1.5rem;
}

.already-signed-section p {
    color: #558b2f;
    margin: 0;
}

/* Fully Signed Section */
.fully-signed-section {
    text-align: center;
    margin-bottom: 2rem;
}

.fully-signed-badge {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid #4caf50;
    margin-bottom: 1.5rem;
}

.fully-signed-badge i {
    font-size: 3rem;
    color: #2e7d32;
    margin-bottom: 1rem;
}

.fully-signed-badge h3 {
    font-size: 1.5rem;
    color: #1b5e20;
    margin-bottom: 0.5rem;
}

.fully-signed-badge p {
    color: #2e7d32;
    margin: 0;
}

/* Loading and Error States */
.loading-state,
.error-state {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-state .spinner {
    margin: 0 auto 1rem;
}

.error-state i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-state h3 {
    margin-bottom: 0.5rem;
}

.error-state p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .contract-parties {
        flex-direction: column;
        gap: 1rem;
    }
    
    .party-arrow {
        transform: rotate(90deg);
    }
    
    .contract-signing-container .contract-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Contract Card */
.contract-card {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.contract-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contract-header {
    padding: 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contract-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #333;
}

.contract-content {
    padding: 1.5rem;
}

.contract-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.contract-footer {
    padding: 1.25rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Document Preview */
.document-preview {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    height: 300px;
    margin-bottom: 1.5rem;
    background-color: #f9f9f9;
    position: relative;
}

.document-preview iframe,
.document-preview embed {
    width: 100%;
    height: 100%;
    border: none;
}

.document-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
    padding: 1rem;
}

.document-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

/* Signing Status */
.signing-status {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.status-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.status-title {
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    color: #333;
}

.status-message {
    margin: 0;
    color: #666;
}

/* Status Variations */
.status-pending {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
}

.status-pending .status-icon {
    color: #ffc107;
}

.status-signed {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.status-signed .status-icon {
    color: #4caf50;
}

.status-error {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
}

.status-error .status-icon {
    color: #f44336;
}

/* Signers */
.signers-list {
    margin-bottom: 1.5rem;
}

.signer-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.signer-item:last-child {
    border-bottom: none;
}

.signer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: #666;
    font-weight: 500;
}

.signer-info {
    flex: 1;
}

.signer-name {
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    color: #333;
}

.signer-role {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.signer-status {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background-color: #f0f0f0;
    color: #666;
}

.status-waiting {
    background-color: #f5f5f5;
    color: #666;
}

.status-inprogress {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-completed {
    background-color: #e8f5e9;
    color: #4caf50;
}

/* Action Buttons */
.contract-actions {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.btn-sign {
   
}

.btn-sign:hover {
  
}

.btn-sign:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-view {
    /* display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center; */
}

.btn-view:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

/* Loading State */
.signing-loading {
    position: relative;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.signing-loading-spinner {
    margin-bottom: 1rem;
}

.signing-loading-message {
    color: #666;
    text-align: center;
}

/* Help Section */
.signing-help {
    margin-top: 2rem;
    padding: 1.25rem;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.signing-help h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
}

.signing-help p {
    color: #666;
    margin-bottom: 0.75rem;
}

.signing-help ol,
.signing-help ul {
    color: #666;
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.signing-help li {
    margin-bottom: 0.5rem;
}

/* Document Modal */
.document-modal {
    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: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.document-modal.open {
    opacity: 1;
    visibility: visible;
}

.document-modal-content {
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.document-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f8f8;
}

.document-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.document-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.document-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.document-modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
}

.document-modal-body iframe,
.document-frame {
    width: 100%;
    height: 75vh;
    border: none;
    display: block;
    background: #fff;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .contract-actions {
        flex-direction: column;
    }
    
    .btn-sign,
    .btn-view {
        width: 100%;
    }
    
    .contract-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contract-header .contract-title {
        margin-bottom: 0.5rem;
    }
}

/* Animation for loading spinner */
/* spin animation moved to base.css */

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
} 

/* Remove custom color and border for step 3 status */
.bid-step[data-step="3"].accepted .step-icon {
    background: #54ab58;
    color: #fff;
    border: none;
}
.bid-step[data-step="3"].rejected .step-icon {
    background: #e76262;
    color: #fff;
    border: none;
}
.bid-step[data-step="3"] .step-icon {
    border: none;
}

/* Always use default text color for step 3 */
.bid-step[data-step="3"] .step-content h3,
.bid-step[data-step="3"] .step-content p {
    color: #222 !important;
    background: none !important;
}

/* Remove colored background for Final Decision label */
.bid-step[data-step="3"] .step-content h3 {
    background: none !important;
}

/* Opacity for faded steps */
.bid-step.faded {
    opacity: 0.4;
    filter: grayscale(1);
    pointer-events: none;
}

/* Opacity for active/completed steps */
.bid-step.active, .bid-step.completed {
    opacity: 1;
    filter: none;
} 

/* Orange for in-review (pending) steps */
.bid-step .step-icon.in-review {
    background: #faa228 !important;
    color: #fff !important;
} 

/* Generic red for rejected steps (any step) */
.step-icon.rejected {
    background: #e76262 !important;
    color: #fff !important;
} 