/* General WordPress Admin Styles */
.wrap h1 {
    margin-bottom: 20px;
}

/* Settings Wrapper and Cards */
.muchat-api-settings-wrapper {
    max-width: 100%;
    margin-top: 20px;
}

.muchat-api-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #c3c4c7;
    border-radius: 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}

.muchat-api-section h2 {
    margin-top: 0;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-size: 1.3em;
    font-weight: 600;
}

.muchat-api-section .description {
    margin-bottom: 15px;
    color: #50575e;
    font-style: normal;
}

/* Product Meta Fields */
.muchat-api-meta-fields-wrapper {
    margin-top: 20px;
}

.muchat-api-meta-field {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 2px;
    padding: 15px;
    transition: all 0.2s ease;
}

.muchat-api-meta-field:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

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

.meta-key {
    font-weight: 600;
    color: #1d2327;
}

.meta-usage {
    font-size: 0.85em;
    color: #50575e;
    display: block;
    margin-top: 4px;
}

.meta-samples {
    font-size: 0.9em;
    color: #50575e;
    margin-top: 8px;
    padding: 8px;
    background: #f6f7f7;
    border-radius: 3px;
    word-break: break-word;
    border: 1px solid #dcdcde;
}

.meta-field-label-input {
    margin-top: 8px;
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    box-shadow: 0 0 0 transparent;
}

.meta-field-label-wrapper {
    margin-top: 12px;
}

.meta-field-label-wrapper label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: #1d2327;
    font-weight: 500;
}

/* Meta Fields Documentation */
.meta-field-example {
    margin: 15px 0;
    padding: 12px;
    background: #f6f7f7;
    border-left: 4px solid #2271b1;
}

/* Submit Button Enhancement */
.wrap .submit {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* WordPress Core UI Elements */
#wpbody-content .wrap {
    margin: 10px 20px 0 2px;
}

.notice {
    margin: 20px 0 15px;
}

/* Settings Page Styles */
/* Fix checkbox alignment */
input[type=checkbox] {
    margin-top: 1px;
}

/* Improve table styling */
.muchat-api-meta-fields-wrapper table {
    border-spacing: 0;
}

.muchat-api-meta-fields-wrapper th {
    font-weight: 600;
    text-align: left;
    padding: 10px;
}

.muchat-api-meta-fields-wrapper td {
    padding: 12px 10px;
    vertical-align: middle;
}

/* Fix for long text overflow */
.muchat-api-meta-fields-wrapper .sample-values {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Fix regular-text width */
.muchat-api-meta-fields-wrapper input.regular-text {
    width: 100%;
}

/* Widget Settings Page Styles */
.action-buttons {
    margin: 15px 0;
}

.action-buttons .button {
    margin-right: 10px;
}

.customize-section {
    margin-top: 15px;
}

.initial-message-row {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
}

.initial-message-row input {
    flex-grow: 1;
    margin-right: 5px;
}

#muchat-add-initial-message {
    margin-bottom: 15px;
}

/* Product Example Page Styles */
/* Ensure Select2 is properly styled */
.select2-container--default .select2-selection--single {
    border-color: #8c8f94;
    min-height: 30px;
}

/* Fix select2 dropdown width */
.select2-container {
    width: 100% !important;
} 