/**
 * incrbufo Admin Styles
 * Enhanced styling for the plugin settings page
 */

/* Main container styling */
.incrbufo-settings-form {
    max-width: 800px;
    margin: 20px 0;
}

.incrbufo-settings-form .form-table {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.incrbufo-settings-form .form-table th {
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    padding: 20px 20px 20px 20px;
    font-weight: 600;
    color: #23282d;
    width: 200px;
    vertical-align: top;
}

.incrbufo-settings-form .form-table td {
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    background: #fff;
}

.incrbufo-settings-form .form-table tr:last-child td,
.incrbufo-settings-form .form-table tr:last-child th {
    border-bottom: none;
}

/* Section headers */
.incrbufo-settings-form h2 {
    color: #23282d;
    font-size: 1.3em;
    margin: 30px 0 15px 0;
    padding: 0;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Field styling */
.incrbufo-settings-form input[type="text"],
.incrbufo-settings-form input[type="number"],
.incrbufo-settings-form select {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.3s ease;
}

.incrbufo-settings-form input[type="text"]:focus,
.incrbufo-settings-form input[type="number"]:focus,
.incrbufo-settings-form select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Checkbox styling */
.incrbufo-settings-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    vertical-align: middle;
}

.incrbufo-settings-form input[type="checkbox"] + label {
    display: inline-block;
    vertical-align: middle;
    font-weight: 500;
    color: #23282d;
}

/* Location checkboxes grid */
.incrbufo-location-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin: 10px 0;
}

.incrbufo-location-checkboxes label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #23282d;
}

.incrbufo-location-checkboxes label:hover {
    background: #e9ecef;
    border-color: #0073aa;
}

.incrbufo-location-checkboxes input[type="checkbox"]:checked + label {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.incrbufo-location-checkboxes input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
}

/* Description styling */
.incrbufo-settings-form .description {
    color: #666;
    font-style: italic;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
}

/* Number input specific styling */
.incrbufo-settings-form input[type="number"] {
    min-width: 120px;
}

/* Select dropdown styling */
.incrbufo-settings-form select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%20%3D%20%2220%22%20height%20%3D%20%2220%22%20xmlns%20%3D%20%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%20%3D%20%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%20%3D%20%22%23555%22%2F%3E%3C%2Fsvg%3E");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 30px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Button styling */
.incrbufo-settings-form .button-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.incrbufo-settings-form .button-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

/* Settings sections */
.incrbufo-settings-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.incrbufo-settings-section h3 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 1.1em;
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
    .incrbufo-settings-form .form-table th {
        width: 100%;
        display: block;
        border-bottom: none;
    }
    
    .incrbufo-settings-form .form-table td {
        display: block;
        padding-top: 10px;
    }
    
    .incrbufo-location-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .incrbufo-settings-form input[type="text"],
    .incrbufo-settings-form input[type="number"],
    .incrbufo-settings-form select {
        max-width: 100%;
    }
}

/* Field groups */
.incrbufo-field-group {
    margin-bottom: 20px;
}

.incrbufo-field-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #23282d;
}

/* Help text */
.incrbufo-help-text {
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #005a87;
}

/* Success/Error messages */
.incrbufo-notice {
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.incrbufo-notice-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.incrbufo-notice-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Settings page header */
.incrbufo-settings-header {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 30px;
    margin: -20px -20px 30px -20px;
    border-radius: 0 0 8px 8px;
}

.incrbufo-settings-header h1 {
    margin: 0;
    color: white;
    font-size: 2em;
    font-weight: 300;
}

.incrbufo-settings-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-size: 16px;
}

/* Settings tabs (if needed in future) */
.incrbufo-settings-tabs {
    margin-bottom: 20px;
    border-bottom: 1px solid #ccd0d4;
}

.incrbufo-settings-tabs .nav-tab {
    margin-right: 5px;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.incrbufo-settings-tabs .nav-tab-active {
    background: #fff;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}

/* Field validation */
.incrbufo-field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px #dc3545 !important;
}

.incrbufo-field-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* Loading states */
.incrbufo-loading {
    opacity: 0.6;
    pointer-events: none;
}

.incrbufo-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltip styling */
.incrbufo-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    color: #0073aa;
    cursor: help;
}

.incrbufo-tooltip .incrbufo-tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
}

.incrbufo-tooltip:hover .incrbufo-tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Settings summary */
.incrbufo-settings-summary {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
}

.incrbufo-settings-summary h4 {
    margin: 0 0 10px 0;
    color: #23282d;
    font-size: 14px;
    font-weight: 600;
}

.incrbufo-settings-summary ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
    font-size: 13px;
}

.incrbufo-settings-summary li {
    margin-bottom: 3px;
}

/* Developer Support Section */
.incrbufo-developer-support {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.incrbufo-support-content h3 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 1.4em;
    font-weight: 600;
    text-align: center;
}

.incrbufo-support-content > p {
    text-align: center;
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.incrbufo-support-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.incrbufo-support-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.incrbufo-support-link:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.incrbufo-support-link:active {
    transform: scale(0.95);
}

.incrbufo-support-icon {
    width: 120px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.incrbufo-support-text {
    display: none;
}

.incrbufo-mdesigner-link {
    background: #121820;
    padding: 10px;
    border-radius: 8px;
}

.incrbufo-mdesigner-link:hover {
    background: #1a2630;
}

.incrbufo-coffee-link {
    background: transparent;
    padding: 10px;
    border-radius: 8px;
}

.incrbufo-coffee-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.incrbufo-coffee-link.clicked {
    transform: scale(1.1);
}

.incrbufo-support-note {
    text-align: center;
    margin-top: 20px;
}

.incrbufo-support-note p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

.incrbufo-support-note em {
    font-style: italic;
    color: #495057;
}

/* Responsive design for support section */
@media (max-width: 768px) {
    .incrbufo-support-links {
        flex-direction: column;
        align-items: center;
    }
    
    .incrbufo-support-link {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .incrbufo-developer-support {
        padding: 20px;
        margin-top: 30px;
    }
} 