/* WP eSign & Send - Frontend Styles */

.wp-esign-form-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wp-esign-form h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 28px;
    text-align: center;
}

.wp-esign-form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.wp-esign-form-section:last-of-type {
    border-bottom: none;
}

.wp-esign-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #444;
    font-size: 20px;
    font-weight: 600;
}

.wp-esign-field {
    margin-bottom: 20px;
}

.wp-esign-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.wp-esign-field .required {
    color: #000;
    font-weight: bold;
}

.wp-esign-field input[type="text"],
.wp-esign-field input[type="email"],
.wp-esign-field input[type="tel"],
.wp-esign-field input[type="date"],
.wp-esign-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.wp-esign-field input[type="text"]:focus,
.wp-esign-field input[type="email"]:focus,
.wp-esign-field input[type="tel"]:focus,
.wp-esign-field input[type="date"]:focus,
.wp-esign-field textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
}

.wp-esign-field textarea {
    resize: vertical;
    min-height: 80px;
}

.wp-esign-field input[type="checkbox"] {
    margin-right: 8px;
}

.wp-esign-consent-text {
    background: #f9f9f9;
    padding: 15px;
    border-left: 4px solid #000;
    margin-bottom: 15px;
    border-radius: 4px;
}

.wp-esign-consent-text p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: #555;
}

.wp-esign-consent-text p:last-child {
    margin-bottom: 0;
}

/* Confidentiality Notice */
.wp-esign-confidentiality-notice {
    background: #fff;
    border: 1px solid #000;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid #000;
}

.wp-esign-confidentiality-notice p {
    margin: 0;
    line-height: 1.6;
    color: #000;
    font-size: 14px;
}

/* Intro Text */
.wp-esign-intro-text {
    background: #f9f9f9;
    padding: 15px;
    border-left: 4px solid #000;
    margin-bottom: 25px;
    border-radius: 4px;
}

.wp-esign-intro-text p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: #333;
}

.wp-esign-intro-text p:last-child {
    margin-bottom: 0;
}

/* Terms Sections */
.wp-esign-terms-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.wp-esign-terms-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #000;
    font-size: 14px;
}

.wp-esign-terms-section p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: #555;
}

.wp-esign-terms-section ol,
.wp-esign-terms-section ul {
    margin: 10px 0;
    padding-left: 25px;
}

.wp-esign-terms-section li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #555;
}

.wp-esign-field-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
    display: block;
}

/* Emergency Contact Notice */
.wp-esign-emergency-notice {
    background: #f9f9f9;
    border: 1px solid #000;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 3px solid #000;
}

.wp-esign-emergency-notice p {
    margin: 0;
    line-height: 1.6;
    color: #000;
    font-size: 13px;
}

/* Signature Section */
.wp-esign-signature-instructions {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.wp-esign-signature-container {
    margin-bottom: 15px;
    text-align: center;
}

.wp-esign-signature-canvas {
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: crosshair;
    display: block;
    margin: 0 auto 15px;
    touch-action: none;
}

.wp-esign-clear-signature {
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    color: #2c3338;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.wp-esign-clear-signature:hover {
    background: #dcdcde;
    border-color: #8c8f94;
}

.wp-esign-clear-signature:active {
    background: #c3c4c7;
}

/* Form Messages */
.wp-esign-form-messages {
    margin: 20px 0;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.wp-esign-form-messages.show {
    display: block;
}

.wp-esign-form-messages.success {
    background: #f9f9f9;
    border: 1px solid #000;
    color: #000;
}

.wp-esign-form-messages.error {
    background: #f9f9f9;
    border: 1px solid #000;
    color: #000;
}

/* Form Actions */
.wp-esign-form-actions {
    text-align: center;
    margin-top: 30px;
}

.wp-esign-submit-button {
    background: #000;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    min-width: 200px;
}

.wp-esign-submit-button:hover {
    background: #333;
}

.wp-esign-submit-button:active {
    background: #000;
}

.wp-esign-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading State */
.wp-esign-submit-button.loading {
    position: relative;
    color: transparent;
}

.wp-esign-submit-button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wp-esign-form-container {
        margin: 10px;
        padding: 20px;
    }
    
    .wp-esign-form h2 {
        font-size: 24px;
    }
    
    .wp-esign-signature-canvas {
        width: 100%;
        max-width: 500px;
    }
}

