/* E-Signature Section Styles */
.esign-section {
    padding: 60px 0;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.esign-section h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
    color: #212529;
}

.esign-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.6;
}

.esign-account {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    color: rgb(45, 33, 117);
    font-size: 0.8rem;
    line-height: 1.6;
    font-weight: 600;
}

.esign-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

/* Tabs */
.esign-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.esign-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.esign-tab:hover {
    color: #495057;
}

.esign-tab.active {
    color: #2d2175;
    border-bottom-color: #2d2175;
}

/* Form Fields */
.esign-field {
    margin-bottom: 24px;
}

.esign-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #212529;
    font-size: 0.95rem;
}

.esign-field input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
    /* Match signature pad sizing */
}

.esign-field input[type="text"]:focus {
    outline: none;
    border-color: #2d2175;
    box-shadow: 0 0 0 3px rgba(45, 33, 117, 0.1);
}

.esign-field input[type="text"]::placeholder {
    color: #adb5bd;
}

/* Inline validation */
.esign-field .input-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 6px;
}

.esign-field.has-error input[type="text"],
.esign-field input[aria-invalid="true"] {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.esign-field.has-error .esign-pad {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Signature Pad */
.esign-pad {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    width: 100%;
    height: 150px;
    position: relative;
    overflow: hidden;
}

.esign-pad canvas {
    display: block;
    cursor: crosshair;
}

/* Type Preview */
.esign-type-preview {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    min-height: 80px;
    padding: 20px;
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    color: #212529;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Clear Button */
.esign-clear-btn {
    background: none;
    border: none;
    color: #007bff;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 8px;
    padding: 4px 8px;
    transition: color 0.3s ease;
}

.esign-clear-btn:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Legal Text */
.esign-legal {
    margin: 30px 0 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.7rem;
    color: #495057;
    line-height: 1.5;
    text-align: center;
}

/* Action Buttons */
.esign-actions {
    display: flex;
    gap: 16px;
    margin-top: 30px;
}

.esign-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.esign-btn-cancel {
    background: #f5f5f5;
    color: #495057;
}

.esign-btn-cancel:hover {
    background: #e9ecef;
}

.esign-btn-confirm {
    background: #2d2175;
    color: white;
}

.esign-btn-confirm:hover {
    background: #231a5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 33, 117, 0.3);
}

/* Inline Terms link should match paragraph color */
.esign-legal a.terms-inline-link {
    color: inherit;
}

.esign-legal a.terms-inline-link:visited,
.esign-legal a.terms-inline-link:hover,
.esign-legal a.terms-inline-link:focus,
.esign-legal a.terms-inline-link:active {
    color: inherit;
}

/* Responsive */
@media (max-width: 768px) {
    .esign-form-container {
        padding: 24px;
        margin: 0 16px;
    }

    .esign-section {
        padding: 40px 0;
    }

    .esign-intro {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .esign-actions {
        flex-direction: column-reverse;
    }

    .esign-btn {
        width: 100%;
    }
}