/* ============================================================
   edt.css — Eye Dropper Tool
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

.edt-pick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    width: 100%;
    padding: 1.1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    background: #e0f0fb;
    color: #0c3d5e;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-bottom: 1.5rem;
}

.edt-pick-btn:hover  { background: #b8d9f0; }
.edt-pick-btn:active { transform: scale(.98); }

.edt-pick-btn:disabled {
    background: #4a5c6e;
    color: #8fa0b0;
    cursor: not-allowed;
}

.edt-unsupported {
    display: none;
    padding: .8rem 1rem;
    background: #fde8d0;
    border: 1px solid #f0a060;
    border-radius: 10px;
    font-size: .875rem;
    color: #7a3a10;
    margin-bottom: 1.25rem;
    text-align: center;
}

.edt-result {
    display: none;
    width: 100%;
}

.edt-swatch-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #2d3f52;
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    min-width: 0;
}

.edt-swatch {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 3px solid rgba(255,255,255,.15);
    flex-shrink: 0;
    background: #ffffff;
    position: relative;
}

/* Checkerboard for transparency context */
.edt-swatch::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    z-index: 0;
}

.edt-swatch-fill {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.edt-swatch-meta {
    flex: 1;
    min-width: 0;
}

.edt-picked-label {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8fa0b0;
    margin-bottom: .4rem;
}

.edt-picked-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: .2rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.edt-picked-hex-small {
    font-size: .85rem;
    color: #90cff0;
    font-family: monospace;
}

.edt-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 400px) {
    .edt-values { grid-template-columns: 1fr; }
}

.edt-value-card {
    background: #2d3f52;
    border-radius: 10px;
    padding: .85rem 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    min-width: 0;
}

.edt-value-inner {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.edt-value-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #6b8fa8;
    margin-bottom: .2rem;
}

.edt-value-text {
    font-size: .8rem;
    font-weight: 700;
    color: #ffffff;
    font-family: monospace;
    word-break: break-all;
    overflow-wrap: break-word;
    min-width: 0;
}

.edt-copy-btn {
    background: #394555;
    border: 1px solid #4a5c6e;
    border-radius: 7px;
    color: #90cff0;
    cursor: pointer;
    font-size: .8rem;
    padding: .35rem .65rem;
    flex-shrink: 0;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.edt-copy-btn:hover  { background: #4a5c6e; color: #ffffff; }
.edt-copy-btn.copied { background: #1e6e3a; color: #ffffff; border-color: #1e6e3a; }

.edt-history-title {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b8fa8;
    margin: 0 0 .75rem;
}

.edt-history {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.edt-history-swatch {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,.1);
    cursor: pointer;
    transition: transform .15s, border-color .15s;
    flex-shrink: 0;
    position: relative;
}

.edt-history-swatch:hover {
    transform: scale(1.15);
    border-color: rgba(255,255,255,.4);
}

.edt-history-swatch[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e2d3d;
    color: #ffffff;
    font-size: .72rem;
    font-family: monospace;
    padding: .25rem .5rem;
    border-radius: 5px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.edt-contrast-section {
    margin-top: 1.25rem;
    background: #2d3f52;
    border-radius: 10px;
    padding: 1rem 1.1rem;
}

.edt-contrast-title {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b8fa8;
    margin-bottom: .75rem;
}

.edt-contrast-pair {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .6rem;
}

.edt-contrast-pair:last-child { margin-bottom: 0; }

.edt-contrast-preview {
    border-radius: 6px;
    padding: .3rem .7rem;
    font-size: .85rem;
    font-weight: 700;
    flex-shrink: 0;
    min-width: 80px;
    text-align: center;
}

.edt-contrast-ratio {
    font-size: .85rem;
    color: #cbd5e1;
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

.edt-contrast-pass {
    font-size: .75rem;
    font-weight: 700;
    padding: .15rem .45rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.edt-contrast-pass.pass { background: #1e6e3a; color: #ffffff; }
.edt-contrast-pass.fail { background: #7a1515; color: #ffffff; }

.edt-actions {
    display: flex;
    gap: .75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.edt-action-btn {
    flex: 1;
    padding: .65rem 1rem;
    font-size: .875rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s, transform .1s;
    background: #394555;
    color: #cbd5e1;
    border: 1px solid #4a5c6e;
}

.edt-action-btn:hover  { background: #4a5c6e; color: #ffffff; }
.edt-action-btn:active { transform: scale(.97); }

.edt-on-white { background: #ffffff; }
.edt-on-black { background: #000000; }
.edt-history-wrap { margin-top: 1.25rem; }
.edt-history-title { display: none; }
