// =========================================================
// * Matcha Period Styles
// =========================================================
@mixin matcha-period-theme($theme) {
    $foreground: map-get($theme, foreground);

    matcha-period {
        display: block;
        width: 100%;
    }

    .matcha-period-trigger {
        &:focus {
            outline: none;
        }

        &.matcha-period-disabled {
            cursor: not-allowed;
            opacity: 0.6;
        }
    }

    .matcha-period-value {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: map-get($foreground, text);

        &.matcha-period-placeholder {
            color: getGrey($theme);
        }
    }

    .matcha-period-arrow {
        margin-left: 8px;
        font-size: 12px;
        color: getBlueGrey($theme);
        transition: transform 0.2s ease;

        &.matcha-period-arrow-open {
            transform: rotate(180deg);
        }
    }

    // Opções espelham o visual do matcha-option (padding/tamanho/estados)
    .matcha-period-option {
        padding: 8px 12px;
        cursor: pointer;
        background: getSurface($theme);
        color: map-get($foreground, text);
        white-space: nowrap;

        &:hover,
        &.matcha-period-option-active {
            background: getBackgroundAlpha($theme);
        }

        &:focus,
        &:active {
            background: getBackground($theme);
        }

        &.matcha-period-option-selected {
            color: getGreen($theme);
        }
    }
}
