/**
 * Cookifi Admin Styles
 * Using WordPress-native colors for consistency with WP admin
 */

:root {
    /* WordPress native colors - use these for most UI elements */
    --wp-text-dark: #1d2327;
    --wp-text-gray: #646970;
    --wp-blue: #2271b1;
    --wp-green: #00a32a;
    --wp-yellow: #dba617;
    --wp-border: #c3c4c7;
    --wp-bg-light: #f6f7f7;
    --wp-bg-white: #ffffff;

    /* Cookifi brand (only for clearly branded elements) */
    --cookifi-brand: #d18a4d;

    /* Semantic mappings to WordPress colors */
    --cookifi-primary: var(--wp-blue);
    --cookifi-base-100: var(--wp-bg-white);
    --cookifi-base-200: var(--wp-bg-light);
    --cookifi-base-300: var(--wp-border);
    --cookifi-base-content: var(--wp-text-dark);
}

.cookifi-settings {
    max-width: 1200px;
    margin: 20px 0;
}

.cookifi-header {
    margin-bottom: 30px;
}

.cookifi-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
}

.cookifi-content {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.cookifi-main {
    flex: 1 1 65%;
    min-width: 0;
}

.cookifi-sidebar {
    flex: 1 1 30%;
    min-width: 280px;
}

.cookifi-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.cookifi-card h2 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
}

.cookifi-card h3 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

/* Form Styles */
.cookifi-card .form-table {
    margin-top: 20px;
}

.cookifi-card .form-table th {
    padding-left: 0;
}

.cookifi-card input[type='text'] {
    width: 100%;
    max-width: 500px;
}

.cookifi-card .description {
    margin-top: 5px;
    font-size: 13px;
    color: #646970;
}

.cookifi-card .description a {
    color: #2271b1;
    text-decoration: none;
}

.cookifi-card .description a:hover {
    text-decoration: underline;
}

/* Status Card */
.cookifi-status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f6f7f7;
    border-radius: 4px;
    margin-top: 10px;
}

.cookifi-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.cookifi-status-active {
    background: #00a32a;
    color: #fff;
}

.cookifi-status-inactive {
    background: #dba617;
    color: #fff;
}

/* Getting Started Steps */
.cookifi-steps {
    margin: 15px 0;
    padding-left: 20px;
    counter-reset: step-counter;
    list-style: none;
}

.cookifi-steps li {
    counter-increment: step-counter;
    margin-bottom: 20px;
    position: relative;
    padding-left: 10px;
}

.cookifi-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: -30px;
    top: 0;
    width: 24px;
    height: 24px;
    background: #2271b1;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.cookifi-steps li strong {
    display: block;
    margin-bottom: 5px;
    color: #1d2327;
}

.cookifi-steps li p {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #646970;
    line-height: 1.5;
}

.cookifi-steps li p a {
    color: #2271b1;
    text-decoration: none;
}

.cookifi-steps li p a:hover {
    text-decoration: underline;
}

/* Resources Links */
.cookifi-links {
    margin: 15px 0;
    padding: 0;
    list-style: none;
}

.cookifi-links li {
    margin-bottom: 10px;
}

.cookifi-links li a {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f6f7f7;
    border-radius: 4px;
    color: #2271b1;
    text-decoration: none;
    transition: background 0.2s;
}

.cookifi-links li a:hover {
    background: #e9ecef;
}

.cookifi-links li a::after {
    content: '→';
    margin-left: auto;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 960px) {
    .cookifi-content {
        flex-direction: column;
    }

    .cookifi-main,
    .cookifi-sidebar {
        flex: 1 1 100%;
    }
}

/* Settings Errors */
.cookifi-settings .notice {
    margin: 20px 0;
}

/* Consent Defaults Textarea - WordPress native styling */
.cookifi-card textarea.code {
    /* Match WordPress standard input styling */
    font-family:
        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
        'Helvetica Neue', sans-serif;
    font-size: 13px;
    line-height: 2;
    padding: 3px 5px;
    margin: 0;
    background-color: #fff;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    color: #2c3338;
    box-shadow: 0 0 0 transparent;
    transition: box-shadow 0.1s linear;
    resize: vertical;
    min-height: 200px;
}

.cookifi-card textarea.code:focus {
    background-color: #fff;
    border-color: var(--wp-blue);
    box-shadow: 0 0 0 1px var(--wp-blue);
    outline: 2px solid transparent;
    outline-offset: 0;
}

.cookifi-card textarea.code::placeholder {
    color: #646970;
    opacity: 0.6;
}

/* Status item spacing adjustment */
.cookifi-status .cookifi-status-item + .cookifi-status-item {
    margin-top: 10px;
}
