/**
 * ELD CF7 Admin Styles
 */

.eld-cf7-admin {
    max-width: 1200px;
    margin: 20px 0;
}

.eld-cf7-admin h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 23px;
    font-weight: 400;
    margin: 0 0 20px;
    line-height: 1.3;
}

.eld-cf7-admin h1 .eld-cf7-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    vertical-align: middle;
}

.eld-cf7-notice {
    background: #f0f6fc;
    border-left: 4px solid #2563eb;
    padding: 12px;
    margin: 20px 0;
}

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

/* Connection Form */
.eld-cf7-connection-form {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.eld-cf7-connection-form h2 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
}

.eld-cf7-connection-form .form-table {
    margin-top: 15px;
}

.eld-cf7-connection-form .form-table th {
    width: 200px;
}

#eld_cf7_form_select {
    min-width: 300px;
}

#eld_cf7_flow_id {
    font-family: monospace;
    min-width: 300px;
}

/* Connected Forms */
.eld-cf7-connected-forms {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.eld-cf7-connected-forms h2 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
}

.eld-cf7-connected-forms table {
    margin-top: 15px;
}

.eld-cf7-connected-forms code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

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

.eld-cf7-status.active {
    background: #d4f4dd;
    color: #0a7c42;
}

.eld-cf7-status.success {
    background: #d4f4dd;
    color: #0a7c42;
}

.eld-cf7-status.error {
    background: #fce4e4;
    color: #cc0000;
}

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

/* Logs Section */
.eld-cf7-logs {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.eld-cf7-logs h2 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
}

.eld-cf7-logs table {
    margin-top: 15px;
}

/* Buttons */
.eld-cf7-view-fields,
.eld-cf7-disconnect,
.eld-cf7-view-log {
    margin: 0 4px;
}

.button-link-delete {
    color: #a00;
}

.button-link-delete:hover {
    color: #dc3232;
}

/* Modal */
.eld-cf7-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.eld-cf7-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 4px;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.eld-cf7-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

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

.eld-cf7-modal-content h3 {
    margin-top: 0;
}

/* Modal Body Tables */
#eld-cf7-modal-body {
    margin-top: 20px;
}

#eld-cf7-modal-body table {
    width: 100%;
    border-collapse: collapse;
}

#eld-cf7-modal-body th {
    background: #f0f0f0;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-size: 13px;
}

#eld-cf7-modal-body td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

#eld-cf7-modal-body tr:hover td {
    background: #f9f9f9;
}

#eld-cf7-modal-body .field-required {
    color: #d63638;
    font-weight: bold;
}

/* Loading Spinner */
.spinner {
    float: none;
    margin: 0 10px;
    visibility: hidden;
}

.spinner.is-active {
    visibility: visible;
}

/* 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 screen and (max-width: 782px) {
    .eld-cf7-connection-form .form-table th,
    .eld-cf7-connection-form .form-table td {
        display: block;
        width: 100%;
    }
    
    #eld_cf7_form_select,
    #eld_cf7_flow_id {
        width: 100%;
    }
}
