/* ELD Forms Admin Styles */

/* Plugin Header */
.eld-forms-plugin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 10px;
}

.eld-forms-plugin-header .eld-forms-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.eld-forms-plugin-header span {
    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;
}

/* Instructions Notice */
.eld-forms-notice {
    background: #f0f6fc;
    border-left: 4px solid #2563eb;
    padding: 12px;
    margin: 20px 0;
}

.eld-forms-notice strong {
    color: #2563eb;
    font-size: 16px;
}

.eld-forms-admin {
    margin-top: 20px;
}

.eld-forms-admin .wp-header-end {
    margin-bottom: 0;
}

/* Empty State */
.eld-forms-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin-top: 20px;
}

.eld-forms-empty-icon {
    font-size: 80px;
    color: #c3c4c7;
    margin-bottom: 20px;
}

.eld-forms-empty-icon .dashicons {
    width: 80px;
    height: 80px;
    font-size: 80px;
}

.eld-forms-empty-state h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.eld-forms-empty-state p {
    color: #646970;
    font-size: 14px;
    margin-bottom: 30px;
}

/* Status indicators */
.eld-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.eld-status.active,
.eld-status.connected,
.eld-status.success {
    background: #edfaef;
    color: #00a32a;
}

.eld-status.inactive,
.eld-status.not-connected {
    background: #f0f0f1;
    color: #646970;
}

.eld-status.error {
    background: #fcf0f1;
    color: #d63638;
}

.eld-status.paused {
    background: #fef3cd;
    color: #856404;
}

.eld-status .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Shortcode display */
.eld-shortcode {
    padding: 4px 8px;
    background: #f0f0f1;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}

.eld-copy-shortcode {
    margin-left: 8px;
    vertical-align: middle;
}

/* Form Editor */
.eld-editor-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.eld-editor-main {
    flex: 1;
    background: #fff;
    padding: 20px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

.eld-editor-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.eld-editor-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #dcdcde;
}

.eld-editor-section:last-child {
    border-bottom: none;
}

.eld-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.eld-section-header h2 {
    margin: 0;
}

/* Field Types Sidebar */
.eld-sidebar-section {
    background: #fff;
    padding: 20px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin-bottom: 20px;
}

.eld-sidebar-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
}

.eld-field-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.eld-field-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.eld-field-types.eld-highlight {
    box-shadow: 0 0 0 3px #2271b1;
    border-radius: 4px;
    transition: box-shadow 0.3s ease;
}

.eld-field-type-btn:hover {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.eld-field-type-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Fields List */
.eld-fields-list {
    min-height: 200px;
}

.eld-no-fields {
    text-align: center;
    padding: 40px;
    color: #646970;
    background: #f6f7f7;
    border: 2px dashed #c3c4c7;
    border-radius: 4px;
}

.eld-field-item {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.2s;
}

.eld-field-item:hover {
    border-color: #2271b1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.eld-field-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.eld-field-item-title {
    font-weight: 600;
    font-size: 14px;
}

.eld-field-item-actions {
    display: flex;
    gap: 8px;
}

.eld-field-item-body .form-table {
    margin: 0;
}

.eld-field-item-body .form-table th {
    padding: 8px 10px 8px 0;
    width: 120px;
}

.eld-field-item-body .form-table td {
    padding: 8px 0;
}

/* Shortcode input */
.eld-shortcode-input {
    width: 100%;
    padding: 8px;
    font-family: monospace;
    font-size: 12px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Editor Actions */
.eld-editor-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #dcdcde;
}

.eld-editor-actions .spinner {
    float: none;
    margin: 0;
}

/* Submissions */
.eld-submissions-filter {
    background: #fff;
    padding: 15px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin: 20px 0;
}

.eld-submissions-filter label {
    margin-right: 10px;
    font-weight: 600;
}

.eld-submissions-filter select {
    min-width: 200px;
}

/* Modal */
#eld-submission-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
}

.eld-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
}

.eld-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.eld-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #646970;
}

.eld-modal-close:hover {
    color: #000;
}

/* Plugin Footer */
.eld-plugin-footer {
    text-align: center;
    padding: 30px 0 10px;
    margin-top: 30px;
    border-top: 1px solid #ddd;
    color: #666;
    font-size: 13px;
    line-height: 2;
}

.eld-plugin-footer a {
    color: #2563eb;
    text-decoration: none;
}

.eld-plugin-footer a:hover {
    text-decoration: underline;
}

.eld-plugin-footer .eld-copyright {
    color: #999;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 782px) {
    .eld-editor-container {
        flex-direction: column;
    }
    
    .eld-editor-sidebar {
        width: 100%;
    }
    
    .eld-field-types {
        grid-template-columns: repeat(3, 1fr);
    }
}
