/*
|--------------------------------------------------------------------------
| Front End Form
|--------------------------------------------------------------------------
*/
.csi-details {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 4px 10px;
    padding: 8px 0;
}

.csi-details .label {
    font-weight: 600;
}

.csi-form-wrapper {
    max-width: 900px;
    margin: 20px auto;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.csi-form-wrapper h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    color: #1d2327;
}

.csi-form-table {
    width: 100%;
    border-collapse: collapse;
}

.csi-form-table th {
    width: 250px;
    padding: 10px 15px 10px 0;
    text-align: left;
    vertical-align: top;
    font-weight: 600;
    color: #1d2327;
}

.csi-form-table td {
    padding: 10px 0;
}

.csi-form-table input[type="text"],
.csi-form-table input[type="date"],
.csi-form-table input[type="datetime-local"],
.csi-form-table select,
.csi-form-table textarea {
    width: 100%;
    max-width: 500px;
    padding: 8px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #ffffff;
    box-sizing: border-box;
}

.csi-form-table input:focus,
.csi-form-table select:focus,
.csi-form-table textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.csi-form-table textarea {
    resize: vertical;
    min-height: 120px;
}

/*
|--------------------------------------------------------------------------
| Actions
|--------------------------------------------------------------------------
*/

.csi-form-actions {
    margin-top: 25px;
}

#csi-submit-button {
    min-width: 120px;
}

/*
|--------------------------------------------------------------------------
| Messages
|--------------------------------------------------------------------------
*/

.csi-form-message {
    margin-top: 20px;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.csi-success {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.csi-error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

/*
|--------------------------------------------------------------------------
| Disabled Button
|--------------------------------------------------------------------------
*/

#csi-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/*
|--------------------------------------------------------------------------
| Admin Pages
|--------------------------------------------------------------------------
*/

.csi-sites-admin,
.csi-settings-admin,
.csi-submissions-admin {
    margin-top: 20px;
}

.csi-sites-admin h2,
.csi-settings-admin h2,
.csi-submissions-admin h2 {
    margin-top: 30px;
}

.widefat td,
.widefat th {
    vertical-align: middle;
}

/*
|--------------------------------------------------------------------------
| Submission Detail View
|--------------------------------------------------------------------------
*/

.csi-submission-details {
    background: #fff;
    border: 1px solid #dcdcde;
    padding: 20px;
    margin-top: 20px;
    border-radius: 6px;
}

.csi-submission-details table {
    width: 100%;
}

.csi-submission-details th {
    width: 250px;
    text-align: left;
    padding: 10px;
    vertical-align: top;
}

.csi-submission-details td {
    padding: 10px;
}

/*
|--------------------------------------------------------------------------
| Filters
|--------------------------------------------------------------------------
*/

.csi-filters {
    margin-bottom: 20px;
}

.csi-filters input,
.csi-filters select {
    margin-right: 10px;
    margin-bottom: 10px;
}

/*
|--------------------------------------------------------------------------
| Responsive Layout
|--------------------------------------------------------------------------
*/

@media screen and (max-width: 768px) {

    .csi-form-wrapper {
        padding: 15px;
    }

    .csi-form-table,
    .csi-form-table tbody,
    .csi-form-table tr,
    .csi-form-table th,
    .csi-form-table td {
        display: block;
        width: 100%;
    }

    .csi-form-table th {
        padding-bottom: 5px;
    }

    .csi-form-table td {
        padding-bottom: 15px;
    }

    .csi-form-table input,
    .csi-form-table select,
    .csi-form-table textarea {
        max-width: 100%;
    }

    .widefat {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}