/**
 * Vehizo Wishlist Module - Admin Styles
 * 
 * @package Vehizo
 * @version 4.1.0
 */

/* Dashboard Widget Styles */
.vehizo-dashboard-widget {
    padding: 1rem;
}

.vehizo-dashboard-widget p {
    margin: 0.75rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vehizo-dashboard-widget strong {
    font-weight: 600;
    color: #1f2937;
}

/* Status indicators */
.vehizo-dashboard-widget span {
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Settings page styles */
.vehizo-admin-section {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin: 1rem 0;
    padding: 1.5rem;
}

.vehizo-admin-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3em;
    color: #1d2327;
}

.vehizo-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f1;
}

.vehizo-setting-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.vehizo-setting-info {
    flex: 1;
    margin-right: 1rem;
}

.vehizo-setting-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1em;
    color: #1d2327;
}

.vehizo-setting-info p {
    margin: 0;
    color: #646970;
    font-size: 0.9em;
}

.vehizo-setting-control {
    flex-shrink: 0;
}

/* Form controls */
.vehizo-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.vehizo-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.vehizo-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.vehizo-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.vehizo-toggle input:checked + .vehizo-toggle-slider {
    background-color: #2271b1;
}

.vehizo-toggle input:focus + .vehizo-toggle-slider {
    box-shadow: 0 0 1px #2271b1;
}

.vehizo-toggle input:checked + .vehizo-toggle-slider:before {
    transform: translateX(26px);
}

/* Statistics display */
.vehizo-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.vehizo-stat-card {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
}

.vehizo-stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #2271b1;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.vehizo-stat-label {
    font-size: 0.9em;
    color: #646970;
    font-weight: 500;
}

/* Notice styles */
.vehizo-notice {
    border-left: 4px solid #2271b1;
    padding: 1rem;
    margin: 1rem 0;
    background: #f0f6fc;
}

.vehizo-notice.error {
    border-left-color: #d63638;
    background: #fcf0f1;
}

.vehizo-notice.warning {
    border-left-color: #dba617;
    background: #fcf9e8;
}

.vehizo-notice.success {
    border-left-color: #00a32a;
    background: #f0f6fc;
}

/* Button styles */
.vehizo-button {
    background: #2271b1;
    border: 1px solid #2271b1;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    font-size: 13px;
    line-height: 2.15384615;
    min-height: 30px;
    margin: 0;
    padding: 0 10px;
    cursor: pointer;
    border-radius: 3px;
    white-space: nowrap;
    box-sizing: border-box;
}

.vehizo-button:hover,
.vehizo-button:focus {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
    text-decoration: none;
}

.vehizo-button.secondary {
    background: #f6f7f7;
    border-color: #dcdcde;
    color: #50575e;
}

.vehizo-button.secondary:hover,
.vehizo-button.secondary:focus {
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #1d2327;
}

.vehizo-button:disabled,
.vehizo-button.disabled {
    color: #a7aaad !important;
    border-color: #dcdcde !important;
    background: #f6f7f7 !important;
    cursor: default;
}

/* Loading spinner */
.vehizo-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: vehizo-spin 1s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

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

/* Help text */
.vehizo-help-text {
    font-style: italic;
    color: #646970;
    font-size: 0.9em;
    margin-top: 0.5rem;
}

/* Code blocks */
.vehizo-code {
    background: #f1f1f1;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 0.5rem;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.9em;
    color: #1d2327;
    overflow-x: auto;
}

/* Responsive design */
@media screen and (max-width: 782px) {
    .vehizo-setting-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .vehizo-setting-info {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .vehizo-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .vehizo-dashboard-widget p {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Plugin list table enhancements */
.plugins .vehizo-plugin-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.vehizo-plugin-status .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.vehizo-plugin-status.active .dashicons {
    color: #00a32a;
}

.vehizo-plugin-status.inactive .dashicons {
    color: #646970;
}

/* Settings tabs */
.vehizo-nav-tabs {
    border-bottom: 1px solid #c3c4c7;
    margin-bottom: 1.5rem;
}

.vehizo-nav-tabs ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.vehizo-nav-tabs li {
    margin: 0;
}

.vehizo-nav-tabs a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #646970;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.vehizo-nav-tabs a:hover {
    color: #2271b1;
}

.vehizo-nav-tabs a.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    font-weight: 600;
}

/* Form validation */
.vehizo-field-error {
    border-color: #d63638 !important;
    box-shadow: 0 0 2px rgba(214, 54, 56, 0.8);
}

.vehizo-error-message {
    color: #d63638;
    font-size: 0.9em;
    margin-top: 0.25rem;
    display: block;
}

/* Success message */
.vehizo-success-message {
    color: #00a32a;
    font-size: 0.9em;
    margin-top: 0.25rem;
    display: block;
}

/* Module cards */
.vehizo-module-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.vehizo-module-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.vehizo-module-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vehizo-module-card h4 {
    margin: 0 0 0.5rem 0;
    color: #1d2327;
    font-size: 1.2em;
}

.vehizo-module-card p {
    color: #646970;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.vehizo-module-card .module-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vehizo-module-status {
    font-size: 0.9em;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-weight: 500;
}

.vehizo-module-status.active {
    background: #d1e7dd;
    color: #0a3622;
}

.vehizo-module-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Accessibility improvements */
.vehizo-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.vehizo-focus-trap:focus {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .vehizo-toggle-slider {
        border: 2px solid #000;
    }
    
    .vehizo-module-card {
        border-width: 2px;
    }
    
    .vehizo-button {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .vehizo-toggle-slider,
    .vehizo-toggle-slider:before,
    .vehizo-nav-tabs a,
    .vehizo-module-card {
        transition: none;
    }
    
    .vehizo-spinner {
        animation: none;
        border-top-color: transparent;
    }
}

/* Dark mode support (if WordPress adds it) */
@media (prefers-color-scheme: dark) {
    .vehizo-admin-section {
        background: #1d2327;
        border-color: #3c434a;
        color: #f0f0f1;
    }
    
    .vehizo-module-card {
        background: #1d2327;
        border-color: #3c434a;
        color: #f0f0f1;
    }
    
    .vehizo-stat-card {
        background: #2c3338;
        border-color: #3c434a;
    }
}

/* Print styles */
@media print {
    .vehizo-button,
    .vehizo-toggle,
    .module-actions {
        display: none !important;
    }
    
    .vehizo-admin-section,
    .vehizo-module-card {
        border: 1px solid #000;
        break-inside: avoid;
    }
}