/* Side Tab Buttons - Admin Dashboard Styles */

.wrap h1 {
    margin-bottom: 20px;
}

.form-table th {
    font-weight: 600;
    padding: 20px 10px 20px 0;
}

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

.form-table input[type="text"],
.form-table input[type="url"],
.form-table input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-table input[type="text"]:focus,
.form-table input[type="url"]:focus,
.form-table input[type="number"]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.form-table input[type="color"] {
    width: 80px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.form-table input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-table select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-position: right 8px center;
}

.form-table .description {
    color: #646970;
    font-style: italic;
    margin-left: 10px;
}

h2.title {
    font-size: 1.3em;
    margin: 1em 0;
    padding: 10px 0;
    border-bottom: 1px solid #ccd0d4;
}

/* Settings sections */
#general_settings,
#button1_settings,
#button2_settings {
    margin-bottom: 30px;
}

/* Submit button styling */
.submit .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    padding: 8px 16px;
    font-size: 14px;
    height: auto;
    line-height: 1.5;
}

.submit .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

/* Help text */
.form-table td p.description {
    margin: 8px 0 0;
    color: #646970;
    font-size: 13px;
}

/* Visual separator between sections */
.form-table tr:first-child th,
.form-table tr:first-child td {
    border-top: 1px solid #e5e5e5;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .form-table th,
    .form-table td {
        padding: 14px 0;
    }
    
    .form-table input[type="text"],
    .form-table input[type="url"],
    .form-table input[type="number"],
    .form-table select {
        width: 100%;
    }
}

/* Settings saved notice */
.notice {
    margin: 15px 0 20px;
}

/* Color picker enhancement */
.stb-color-field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stb-color-picker {
    width: 60px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
    vertical-align: middle;
}

.stb-color-input {
    width: 140px;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    vertical-align: middle;
}

.stb-color-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.stb-color-format {
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
}

.stb-color-format:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.stb-color-field .description {
    flex-basis: 100%;
    margin-top: 5px;
}

/* Info boxes */
.settings-info-box {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 12px;
    margin: 10px 0;
    border-radius: 4px;
}

.settings-info-box p {
    margin: 0;
    color: #1d2327;
}

/* Icon preview (optional enhancement) */
.icon-preview {
    display: inline-block;
    margin-left: 10px;
    padding: 8px 12px;
    background: #f0f0f1;
    border-radius: 4px;
    font-size: 18px;
}

/* Exclusion settings */
.exclusion-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.exclusion-list label {
    display: block;
    margin-bottom: 8px;
    padding: 4px;
    transition: background 0.2s;
}

.exclusion-list label:hover {
    background: #fff;
    border-radius: 3px;
}

.exclusion-list input[type="checkbox"] {
    margin-right: 8px;
}

/* URL pattern textarea */
.form-table textarea.large-text {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* Help text for exclusions */
.form-table .description code {
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: #d63638;
}

/* Icon Picker Styles */
.stb-icon-field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stb-icon-field input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.stb-icon-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #f0f0f1;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 24px;
    color: #2271b1;
}

.stb-icon-preview .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.stb-icon-picker-btn {
    white-space: nowrap;
}

/* Icon Picker Modal */
.stb-icon-modal {
    display: block;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.stb-icon-modal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.stb-icon-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stb-icon-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1d2327;
}

.stb-icon-close {
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.stb-icon-close:hover,
.stb-icon-close:focus {
    color: #000;
}

.stb-icon-search {
    margin: 15px 25px;
    width: calc(100% - 50px);
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.stb-icon-search:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.stb-icon-tabs {
    display: flex;
    gap: 5px;
    padding: 0 25px;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
    flex-wrap: wrap;
}

.stb-icon-tab {
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 13px;
    color: #646970;
    white-space: nowrap;
    transition: all 0.2s;
}

.stb-icon-tab:hover {
    color: #1d2327;
    background: #f6f7f7;
}

.stb-icon-tab.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    font-weight: 600;
}

.stb-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 20px 25px;
    overflow-y: auto;
    max-height: 50vh;
}

.stb-icon-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.stb-icon-box:hover {
    border-color: #2271b1;
    background: #f0f6fc;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stb-icon-box .dashicons {
    font-size: 28px;
    margin-bottom: 8px;
    color: #1d2327;
    width: 28px;
    height: 28px;
}

.stb-icon-box span {
    font-size: 11px;
    text-align: center;
    color: #646970;
    line-height: 1.3;
}

.stb-icon-custom {
    padding: 20px 25px;
    border-top: 1px solid #ddd;
    background: #f6f7f7;
}

.stb-icon-custom label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1d2327;
}

.stb-custom-icon-input {
    width: calc(100% - 120px);
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.stb-use-custom {
    margin-left: 10px;
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.stb-use-custom:hover {
    background: #135e96;
}

/* Responsive adjustments */
@media (max-width: 782px) {
    .stb-icon-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .stb-icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .stb-icon-tabs {
        padding: 0 15px;
    }
    
    .stb-icon-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
}
