/* =============================================================
 * NEW UNIFIED RENDERER STYLES (lp-unified-form-*)
 * ============================================================= */

/* Main container for new unified forms */
.lp-unified-form-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.lp-form-title {
    text-align: center;
    margin: 0 0 30px 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.lp-form-content {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    line-height: 1.8;
    color: #444;
    font-size: 16px;
}

/* Unified form styles */
.lp-unified-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Field container styles */
.lp-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.lp-field:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lp-field label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-size: 15px;
}

.lp-field input[type="text"],
.lp-field textarea,
.lp-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
    color: #111827;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.lp-field input[type="text"]:focus,
.lp-field textarea:focus,
.lp-field select:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lp-field textarea {
    min-height: 120px;
    resize: vertical;
}

.lp-field-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.lp-field-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.lp-field-checkbox label {
    margin: 0;
    cursor: pointer;
}

.required {
    color: #ef4444;
    margin-left: 3px;
}

/* Form actions */
.lp-form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.lp-form-actions .button {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lp-form-actions .button-primary {
    background-color: #3b82f6;
    color: white;
    border: 1px solid transparent;
}

.lp-form-actions .button-primary:hover {
    background-color: #2563eb;
}

.lp-form-actions .lp-back-btn {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.lp-form-actions .lp-back-btn:hover {
    background-color: #e5e7eb;
}

/* Signature field */
.lp-field-signature {
    margin-top: 20px;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.lp-field-signature canvas {
    width: 100%;
    height: 200px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: crosshair;
}

.lp-field-signature .clear-signature {
    margin-top: 10px;
    background: #6b7280;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.lp-field-signature .clear-signature:hover {
    background: #4b5563;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lp-unified-form-container {
        margin: 20px 15px;
        padding: 20px 15px;
    }
    
    .lp-form-title {
        font-size: 24px;
    }
    
    .lp-field {
        padding: 12px;
    }
    
    .lp-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .lp-form-actions .button {
        width: 100%;
    }
}

/* Checkbox field styles */
.lp-field[data-type="checkbox"] {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
}

.lp-field[data-type="checkbox"] label {
    flex: 1;
    margin: 0;
    cursor: pointer;
    font-size: 15px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lp-field[data-type="checkbox"] input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    order: -1;
}

/* Text field styles */
.lp-field[data-type="text"] input[type="text"] {
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.lp-field[data-type="text"] input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.lp-field[data-type="text"] input[type="text"]:required {
    border-left: 4px solid #dc3232;
}

/* Textarea field styles */
.lp-field[data-type="textarea"] textarea {
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.4;
}

.lp-field[data-type="textarea"] textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.lp-field[data-type="textarea"] textarea:required {
    border-left: 4px solid #dc3232;
}

/* Select field styles */
.lp-field[data-type="select"] select {
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}

.lp-field[data-type="select"] select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.lp-field[data-type="select"] select:required {
    border-left: 4px solid #dc3232;
}

/* HTML field styles */
.lp-field-html {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    line-height: 1.8;
    color: #444;
    font-size: 16px;
}

/* Signature field styles */
.lp-field-signature {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 25px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lp-field-signature label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 18px;
    margin: 0 0 15px 0;
}

.lp-field-signature .signature-pad {
    width: 100%;
    height: 200px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: crosshair;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    touch-action: none;
    display: block;
}

.lp-field-signature .clear-signature {
    align-self: flex-end;
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.lp-field-signature .clear-signature:hover {
    background: #545b62;
}

/* Submit button styles */
.lp-submit-btn {
    padding: 15px 30px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    align-self: center;
    min-width: 150px;
}

.lp-submit-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.lp-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error message styles */
.lp-error {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Required field indicator */
.lp-field label .required {
    color: #dc3232;
    font-weight: bold;
    margin-left: 3px;
}

/* Responsive styles for unified renderer */
@media (max-width: 768px) {
    .lp-unified-form-container {
        margin: 20px auto;
        padding: 20px;
    }
    
    .lp-form-title {
        font-size: 24px;
    }
    
    .lp-field {
        padding: 15px;
    }
    
    .lp-field-signature {
        padding: 20px;
    }
    
    .lp-field-signature .signature-pad {
        height: 150px;
    }
    
    .lp-submit-btn {
        width: 100%;
        padding: 12px;
    }
}

/* =============================================================
 * LEGACY RENDERER STYLES (mikeanor-signature-form-*)
 * ============================================================= */

.mikeanor-signature-form-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.form-section {
    margin-bottom: 35px;
    padding: 25px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.title-section {
    text-align: center;
    background: #f8f9fa;
    border: none;
    padding: 20px;
    margin-bottom: 40px;
}

.title-section h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.content-section {
    line-height: 1.8;
    color: #444;
    font-size: 16px;
}

.checklist-section h3,
.text-fields-section h3,
.select-fields-section h3,
.signature-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 500;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    transition: all 0.2s ease;
}

.checklist-item:hover {
    background: #f0f0f0;
    border-color: #ddd;
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.checklist-item label {
    flex: 1;
    margin: 0;
    cursor: pointer;
    font-size: 15px;
    color: #444;
}

/* Text Fields Styles */
.text-fields-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.text-field-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.text-field-item label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 15px;
    margin: 0;
}

.text-field-item .required {
    color: #dc3232;
    font-weight: bold;
    margin-left: 3px;
}

.text-field-item input[type="text"] {
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.text-field-item input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.text-field-item input[type="text"]:required {
    border-left: 4px solid #dc3232;
}

/* Select Fields Styles */
.select-fields-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.select-field-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.select-field-item label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 15px;
    margin: 0;
}

.select-field-item .required {
    color: #dc3232;
    font-weight: bold;
    margin-left: 3px;
}

.select-field-item select {
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}

.select-field-item select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.select-field-item select:required {
    border-left: 4px solid #dc3232;
}

.signature-pad-container {
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
}

#signature-pad {
    width: 100%;
    height: 200px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.signature-controls {
    padding: 10px;
    text-align: center;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
}

.signature-controls button {
    margin: 0 5px;
}

.submit-section {
    text-align: center;
    background: none;
    border: none;
    padding: 0;
    margin-top: 40px;
}

#submit-signature {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 500;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#submit-signature:hover {
    background: #005177;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#submit-signature:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mikeanor-signature-form-container {
        margin: 20px;
        padding: 20px;
    }

    .form-section {
        padding: 20px;
        margin-bottom: 25px;
    }

    .title-section h2 {
        font-size: 24px;
    }

    #signature-pad {
        height: 150px;
    }

    #submit-signature {
        padding: 12px 30px;
        font-size: 15px;
    }

    .text-field-item input[type="text"],
    .select-field-item select {
        padding: 10px 12px;
        font-size: 14px;
    }

    .text-field-item label,
    .select-field-item label {
        font-size: 14px;
    }
}

/* Signature Buttons Styles */
.mikeanor-signature-buttons {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.signature-buttons-header {
    margin-bottom: 15px;
}

.signature-buttons-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 500;
}

.signature-buttons-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.signature-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.signature-button i {
    font-size: 18px;
}

.signature-button-primary {
    background: #0073aa;
    color: #fff;
}

.signature-button-primary:hover {
    background: #005177;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.signature-button-secondary {
    background: #f8f9fa;
    color: #444;
    border: 1px solid #ddd;
}

.signature-button-secondary:hover {
    background: #e9ecef;
    border-color: #ccc;
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Signature Popup Styles */
.signature-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    overflow-y: auto;
}

.signature-popup-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 900px;
    border-radius: 6px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.signature-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.signature-popup-close:hover {
    color: #333;
}

.signature-popup h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.signature-loading {
    text-align: center;
    padding: 40px 0;
}

.signature-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3a7cff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

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

.os-signatures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.os-signature-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.os-signature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.os-signature-header {
    background-color: #f7f9fc;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.os-signature-header-main h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #333;
}

.os-signature-date {
    font-size: 13px;
    color: #777;
}

.os-signature-content {
    padding: 20px 15px;
}

.os-signature-image {
    text-align: center;
    background-color: #fff;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 15px;
}

.os-signature-image img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
}

.os-signature-checklist {
    margin-top: 20px;
}

.os-signature-checklist h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.os-signature-checklist ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.os-signature-checklist li {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.os-signature-checklist li:last-child {
    border-bottom: none;
}

.os-signature-checklist .status-icon {
    margin-right: 10px;
    font-weight: bold;
}

.os-signature-checklist li.checked {
    color: #46b450;
}

.os-signature-checklist li.unchecked {
    color: #dc3232;
}

.os-signature-checklist .item-text {
    flex: 1;
}

@media (max-width: 768px) {
    .signature-popup-content {
        width: 95%;
        padding: 20px 15px;
        margin: 30px auto;
    }
    
    .os-signatures-grid {
        grid-template-columns: 1fr;
    }
    
    .os-signature-header {
        padding: 12px;
    }
    
    .os-signature-content {
        padding: 15px 12px;
    }
}

/* Signature Pad - Desktop */
@media screen and (min-width: 768px) {
    .signature-pad {
        width: 750px !important;
        height: 250px !important;
        max-width: 100%;
        display: block;
        margin: 0 auto;
        background-color: #fff;
        border: 2px solid #ddd;
        border-radius: 6px;
        box-sizing: border-box;
    }
}

/* Signature Pad - Mobile */
@media screen and (max-width: 767px) {
    .signature-pad {
        width: 250px !important;
        height: 350px !important;
        max-width: 100%;
        display: block;
        margin: 0 auto;
        background-color: #fff;
        border: 2px solid #ddd;
        border-radius: 6px;
        box-sizing: border-box;
    }
} 

/* Form actions container */
.lp-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
}

.lp-back-btn {
    background: #6c757d !important;
    color: white !important;
    border: 1px solid #6c757d !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    cursor: pointer !important;
}

.lp-back-btn:hover {
    background: #5a6268 !important;
    border-color: #5a6268 !important;
    color: white !important;
    text-decoration: none !important;
}

.lp-submit-btn {
    background: #007bff !important;
    color: white !important;
    border: 1px solid #007bff !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.lp-submit-btn:hover {
    background: #0056b3 !important;
    border-color: #0056b3 !important;
    color: white !important;
}

/* Responsive styles for form actions */
@media (max-width: 768px) {
    .lp-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .lp-back-btn,
    .lp-submit-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
} 