/* Contrast Checker Specific Stylesheet */

.cc-grid-layout {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 32px;
    margin-top: 24px;
    margin-bottom: 32px;
    width: 100%;
}

.cc-left-panel {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.cc-right-panel {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Card Styling */
.cc-select-card, .cc-settings-card, .cc-options-card {
    background: var(--bg-color);
    border: 1px solid #D1D5DB;
    border-radius: var(--border-radius-lg);
    padding: 28px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.cc-select-card:hover, .cc-settings-card:hover, .cc-options-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow-hover);
}

.cc-panel-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 20px 0;
    letter-spacing: 0.5px;
}

.cc-section-subtitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    display: block;
    margin-bottom: 12px;
}

/* Color Selectors layout */
.cc-color-selectors-wrap {
    display: flex;
    gap: 24px;
    align-items: center;
    position: relative;
    width: 100%;
    margin-bottom: 24px;
}

.cc-color-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cc-color-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

/* Input Fields styling */
.cc-color-input-field {
    display: flex;
    align-items: center;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    padding: 8px 12px;
    background: #FFF;
    gap: 10px;
    transition: border-color 0.2s;
}

.cc-color-input-field:focus-within {
    border-color: var(--primary-color);
    background: #F3EEFF;
}

.cc-color-preview-block {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.cc-hex-text-input {
    border: none;
    background: transparent;
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    outline: none;
    flex-grow: 1;
}

.cc-copy-input-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s;
}

.cc-copy-input-btn:hover {
    color: var(--primary-color);
}

/* Color Picker Canvas */
.cc-sv-canvas {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    position: relative;
    cursor: crosshair;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    background: linear-gradient(to bottom, transparent, #000), linear-gradient(to right, #FFF, transparent);
}

.cc-sv-cursor {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #FFF;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    position: absolute;
    transform: translate(-6px, -6px);
    pointer-events: none;
}

.cc-hue-slider-wrap {
    width: 100%;
    display: flex;
    align-items: center;
}

.cc-hue-slider {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}

.cc-hue-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FFF;
    border: 2px solid var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* Values Grid */
.cc-values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.cc-val-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cc-val-lbl {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
}

.cc-val-field {
    width: 100%;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    padding: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    background: var(--bg-alt);
    text-align: center;
    outline: none;
}

/* Middle Swap Button */
.cc-middle-swap-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #D1D5DB;
    background: #FFF;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
    z-index: 10;
    margin-top: 24px;
}

.cc-middle-swap-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-alt);
    color: var(--primary-color);
}

/* Presets Grid */
.cc-presets-section {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cc-presets-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 8px;
}

.cc-preset-card-btn {
    aspect-ratio: 1.2;
    border-radius: 8px;
    border: 1px solid #D1D5DB;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cc-preset-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}

.cc-preset-left {
    flex: 1;
    height: 100%;
}

.cc-preset-right {
    flex: 1;
    height: 100%;
}

.cc-preset-more-btn {
    aspect-ratio: 1.2;
    border-radius: 8px;
    border: 1px solid #D1D5DB;
    background: #FFF;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    transition: all 0.2s;
}

.cc-preset-more-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Results Card (Right Panel) */
.cc-ratio-value-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    background: var(--bg-alt);
    margin-bottom: 20px;
}

.cc-ratio-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cc-ratio-lbl {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.cc-ratio-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Space Mono', monospace;
}

.cc-compliance-badge {
    background: #D1FAE5; /* Default soft green */
    color: #065F46;
    border-radius: 8px;
    padding: 8px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-width: 90px;
}

.cc-compliance-badge.fail {
    background: #FEE2E2;
    color: #991B1B;
}

.cc-compliance-badge .badge-title {
    font-size: 16px;
    font-weight: 800;
}

.cc-compliance-badge .badge-sub {
    font-size: 10px;
    font-weight: 700;
}

/* Compliance Rows */
.cc-wcag-rows-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cc-wcag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.cc-wcag-row:last-child {
    border-bottom: none;
}

.cc-wcag-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.cc-wcag-status-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-wcag-badge {
    background: #EF4444; /* Default fail red */
    color: #FFF;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 32px;
    text-align: center;
}

.cc-wcag-badge.pass {
    background: #10B981;
}

.cc-status-icon {
    font-size: 14px;
    font-weight: 800;
    color: #EF4444;
}

.cc-status-icon.pass {
    color: #10B981;
}

/* Previews Card */
.cc-preview-card-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.cc-preview-card-item:last-child {
    margin-bottom: 0;
}

.cc-preview-lbl {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.cc-preview-text-box {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    min-height: 72px;
    display: flex;
    align-items: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}

.cc-preview-text-box.normal {
    font-size: 14px;
    font-weight: 400;
}

.cc-preview-text-box.large {
    font-size: 18px;
    font-weight: 700;
}

/* Bottom Options */
.cc-bottom-options-grid {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 32px;
    margin-bottom: 40px;
    width: 100%;
}

.cc-options-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 16px 0;
}

.cc-sample-input-wrap {
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    padding: 10px 16px;
    background: #FFF;
}

.cc-sample-input {
    width: 100%;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    background: transparent;
    outline: none;
}

.cc-checkboxes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    user-select: none;
}

.cc-checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1.5px solid #D1D5DB;
    border-radius: 4px;
    background: #FFF;
    display: inline-block;
    position: relative;
    transition: all 0.2s;
}

.cc-checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.cc-checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: "✓";
    font-size: 11px;
    font-weight: 800;
    color: #FFF;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.info-icon-tooltip {
    font-size: 11px;
    color: var(--text-muted);
    cursor: help;
    background: var(--bg-alt);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Bottom Bar */
.cc-bottom-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-top: 12px;
}

.cc-action-btn {
    border: 1px solid var(--border-color);
    background: #FFF;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.cc-action-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-alt);
}

.cc-action-btn.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #FFF;
    margin-left: auto;
}

.cc-action-btn.primary:hover {
    opacity: 0.95;
    background: var(--primary-color);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .cc-grid-layout, .cc-bottom-options-grid {
        grid-template-columns: 1fr;
    }
    .cc-presets-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .cc-color-selectors-wrap {
        flex-direction: column;
    }
    .cc-middle-swap-btn {
        margin-top: 0;
        margin-bottom: 0;
    }
    .cc-bottom-bar {
        flex-direction: column;
    }
    .cc-action-btn {
        width: 100%;
        margin-left: 0 !important;
    }
    .cc-presets-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
