/**
 * Crochet Pattern Block - Frontend & Shared Styles
 *
 * @package InfoCrochet
 * @since 1.1.0
 */

.infocrochet-pattern {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border: 1px solid #e0d6cc;
    border-radius: 6px;
    background-color: #faf8f5;
    font-family: inherit;
    line-height: 1.8;
}

.infocrochet-pattern__title {
    margin: 0 0 0.75em 0;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #c9b99a;
    font-size: 1.15em;
    color: #5a4a3a;
}

.infocrochet-pattern__row {
    margin: 0.3em 0;
    padding: 0.2em 0;
    display: flex;
    align-items: baseline;
}

/* Row progress checkbox — visually hidden but accessible */
.infocrochet-pattern__checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Checkbox label with Font Awesome icon */
.infocrochet-pattern__checkbox-label {
    cursor: pointer;
    margin-right: 0.5em;
    color: #c9b99a;
    font-size: 1.05em;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.infocrochet-pattern__checkbox-label::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    content: '\f0c8';
}

.infocrochet-pattern__checkbox:checked + .infocrochet-pattern__checkbox-label::before {
    font-weight: 900;
    content: '\f14a';
    color: #7b5e3c;
}

.infocrochet-pattern__checkbox:focus-visible + .infocrochet-pattern__checkbox-label {
    outline: 2px solid #7b5e3c;
    outline-offset: 2px;
    border-radius: 2px;
}

.infocrochet-pattern__row-label {
    display: inline;
    font-weight: 700;
    color: #7b5e3c;
    white-space: nowrap;
}

.infocrochet-pattern__row-text {
    color: #333;
}

/* Completed row — paler text */
.infocrochet-pattern__row--completed .infocrochet-pattern__row-label,
.infocrochet-pattern__row--completed .infocrochet-pattern__row-text {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.infocrochet-pattern--empty {
    border-style: dashed;
    background-color: #f5f5f5;
}

.infocrochet-pattern__placeholder {
    color: #999;
    font-style: italic;
    margin: 0;
}

/* Locale selector */
.infocrochet-locale-selector {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1em;
    padding: 0.5em 1em;
    background-color: #faf8f5;
    border: 1px solid #e0d6cc;
    border-radius: 6px;
    font-size: 0.9em;
}

.infocrochet-locale-selector__label {
    color: #5a4a3a;
    font-weight: 600;
    white-space: nowrap;
    cursor: default;
}

.infocrochet-locale-selector__label i {
    color: #7b5e3c;
}

.infocrochet-locale-selector__select {
    padding: 0.25em 0.5em;
    border: 1px solid #c9b99a;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    font-size: 1em;
    cursor: pointer;
}

.infocrochet-locale-selector__select:focus {
    outline: 2px solid #7b5e3c;
    outline-offset: 1px;
}
