/* ============================================================
   index.css — Styles for the password generator (index.html)
   Loaded after style.css. Uses theme variables defined there.
   ============================================================ */

#card {
    display: flex;
    padding: 26px;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--card-background-color);
}

#password-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
}

#password-row span {
    align-self: stretch;
    color: var(--main-text);
    font-family: var(--password-font);
    font-size: clamp(18px, 4.6vw, 24px);
    overflow-wrap: anywhere;
    font-style: normal;
    font-weight: 500;
    line-height: 140%;
    overflow-wrap: break-word;
    word-break: break-all;
}

#strength-row {
    display: flex;
    padding-top: 18px;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
}

#strength-tracker {
    display: flex;
    height: 6px;
    overflow: hidden;
    align-items: center;
    align-self: stretch;
    border-radius: 3px;
    background-color: #2A2925;
}

#strength-bar {
    display: block;
    width: 85%;
    height: 6px;
    background-color: #6FBF8E;
}

#info-row {
    display: flex;
    padding-top: 12px;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
}

#meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
}

#strength-info {
    color: #6FBF8E;
    font-family: var(--secondray-font);
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

#strength-bits {
    color: #8E8A80;
    font-family: var(--secondray-font);
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

#buttons-row {
    display: flex;
    padding-top: 20px;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
}

#buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: stretch;
}

#button-copy {
    display: flex;
    padding: 13px 22px;
    justify-content: center;
    align-items: center;
    flex: 1 0 0;
    border-radius: 999px;
    background-color: var(--button-color);
}

#button-copy span {
    color: var(--button-text-color);
    font-family: var(--secondray-font);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

#button-new {
    display: flex;
    padding: 13px 22px;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--border-color);
}

#button-new span {
    color: #F5F1E8;
    font-family: var(--secondray-font);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

#length-row {
    display: flex;
    padding-top: 18px;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
}

#length-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    align-self: stretch;
}

#length-selector label {
    color: var(--main-text);
    font-family: var(--password-font);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

#length-chooser {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    min-width: 0;
    height: 18px;
    margin: 0;
    background: transparent;
    cursor: pointer;
}

/* Chrome, Safari, Edge. JS sets --fill (0-100%) */
#length-chooser::-webkit-slider-runnable-track {
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--theme-color) 0 var(--fill, 21%), var(--border-color) var(--fill, 21%) 100%) center / 100% 4px no-repeat;
}

#length-chooser::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: 0;
    border: 0;
    border-radius: 50%;
    background: var(--theme-color);
}

/* Firefox (separate rules) */
#length-chooser::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
}

#length-chooser::-moz-range-progress {
    height: 4px;
    border-radius: 2px;
    background: var(--theme-color);
}

#length-chooser::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: var(--theme-color);
}

#length-chooser:focus-visible {
    outline: 2px solid var(--main-text);
    outline-offset: 4px;
}

#password-length {
    color: #F5F1E8;
    font-family: var(--password-font);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

#settings-row {
    display: flex;
    padding-top: 16px;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
}

#options {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    align-self: stretch;
}

.options-row {
    display: flex;
    align-items: center;
    gap: 24px;
    align-self: stretch;
}

.option {
    display: flex;
    padding: 8px 0;
    align-items: center;
    gap: 10px;
    flex: 1 0 0;
}

.personlization {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid var(--small-text);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.personlization:checked {
    background: var(--theme-color);
    border-color: var(--theme-color);
}

.personlization::after {
    content: "";
    width: 4px;
    height: 8px;
    border: solid var(--button-text-color);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
    opacity: 0;
}

.personlization:checked::after {
    opacity: 1;
}

.personlization:focus-visible {
    outline: 2px solid var(--main-text);
    outline-offset: 3px;
}

.option label {
    cursor: pointer;
    color: var(--main-text);
    font-family: var(--secondray-font);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

button:hover {
    opacity: 0.9;
}

#button-new:hover {
    border-color: var(--small-text);
    opacity: 1;
}

button:focus-visible {
    outline: 2px solid var(--main-text);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    #card {
        padding: 20px;
    }

    .options-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
}

