/* components.css - Reusable UI components */

/* Button group */
.button-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Primary button */
.button-primary {
    background: var(--accent-primary);
    color: var(--background-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    font: 700 1rem 'Montserrat', Arial, sans-serif;
    cursor: pointer;
    border-radius: 8px;
    margin: 0.5rem;
    min-height: 48px;
    width: 100%;
    max-width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease, filter 0.3s ease;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    box-shadow: 4px 4px 12px var(--button-shadow);
}

.button-primary:hover {
    background: var(--accent-hover);
    box-shadow: 5px 5px 14px var(--button-shadow);
    filter: drop-shadow(0 0 8px var(--glow-green));
    transform: translateY(-2px);
}

.button-primary:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    animation: shine 0.8s ease-out forwards;
}

.button-primary:active {
    transform: translateY(0);
    box-shadow: 2px 2px 6px var(--button-shadow);
    filter: none;
}

/* Secondary button */
.button-secondary {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 0.5rem 1rem;
    font: 700 0.9rem 'Montserrat', Arial, sans-serif;
    cursor: pointer;
    border-radius: 8px;
    min-height: 40px;
    width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease, filter 0.3s ease;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 4px 4px 12px var(--button-shadow);
}

.button-secondary:hover {
    background: rgba(154, 184, 122, 0.1);
    box-shadow: 3px 3px 8px var(--button-shadow);
    filter: drop-shadow(0 0 8px var(--glow-green));
    transform: translateY(-1px);
}

.button-secondary:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    animation: shine 0.8s ease-out forwards;
}

.button-secondary:active {
    transform: translateY(0);
    box-shadow: 1px 1px 4px var(--button-shadow);
    filter: none;
}

/* Outline button */
.button-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 0.75rem 1.5rem;
    font: 700 1rem 'Montserrat', Arial, sans-serif;
    min-width: 260px;
    max-width: 310px;
    width: auto;
    min-height: 48px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease, filter 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 4px 4px 12px var(--button-shadow);
}

.button-outline:hover {
    background: rgba(154, 184, 122, 0.1);
    box-shadow: 3px 3px 8px var(--button-shadow);
    filter: drop-shadow(0 0 8px var(--glow-green));
    transform: translateY(-1px);
}

.button-outline:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    animation: shine 0.8s ease-out forwards;
}

.button-outline:active {
    transform: translateY(0);
    box-shadow: 1px 1px 4px var(--button-shadow);
    filter: none;
}

/* Tag */
.tag {
    display: inline-block;
    background: rgba(154, 184, 122, 0.2);
    color: var(--accent-primary);
    font: 700 0.7rem 'Montserrat', Arial, sans-serif;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* Badge overlay */
.badge-overlay {
    position: relative;
    opacity: 0.85;
}

.badge-overlay::before {
    content: 'Coming Soon!';
    position: absolute;
    top: 20%;
    left: -20%;
    width: 140%;
    padding: 0.7rem 1rem;
    background: rgba(154, 184, 122, 0.7);
    color: var(--background-primary);
    font: 700 1rem 'Montserrat', Arial, sans-serif;
    text-align: center;
    transform: rotate(-30deg);
    box-shadow: 2px 2px 4px var(--element-shadow);
    z-index: 2;
    pointer-events: none;
    animation: pulseText 2s ease-in-out infinite;
}

.badge-overlay .button-primary,
.badge-overlay .button-secondary {
    background: rgba(160, 160, 160, 0.3);
    color: #666;
    border-color: #999;
    cursor: default;
    box-shadow: 2px 2px 4px var(--element-shadow);
}

.badge-overlay .button-primary:hover,
.badge-overlay .button-secondary:hover,
.badge-overlay .button-primary:active,
.badge-overlay .button-secondary:active {
    background: rgba(160, 160, 160, 0.3);
    box-shadow: 2px 2px 4px var(--element-shadow);
    transform: none;
}

.badge-overlay .button-primary:hover::before,
.badge-overlay .button-secondary:hover::before {
    content: none;
}

/* Note text */
.note-text {
    font: 0.8rem 'Open Sans', Arial, sans-serif;
    margin-top: 1.5rem;
    color: var(--accent-primary);
    opacity: 0.9;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
}

/* Feature icon */
.feature-icon {
    display: block;
    margin: 0 auto 1rem;
    height: 40px;
    width: auto;
    max-width: 100%;
}

/* Media Query 1: Portrait Phone (≤ 767px) */
@media (orientation: portrait) and (max-width: 767px) {
    .button-group {
        gap: 0.5rem;
    }

    .button-primary,
    .button-secondary {
        font-size: 1rem;
        min-height: 48px;
    }

    .button-outline {
        min-width: 200px;
        max-width: 250px;
        font-size: 1rem;
        min-height: 40px;
    }

    .tag {
        font-size: 1rem;
        padding: 0.4rem 0.6rem;
    }

    .badge-overlay::before {
        font-size: 1.25rem;
        padding: 0.6rem 1rem;
        top: 20%;
        left: -20%;
        width: 140%;
        box-shadow: 0 5px 15px var(--element-shadow), 0 0 20px var(--glow-green);
    }

    .note-text {
        font-size: 0.9rem;
    }

    .feature-icon {
        height: 35px;
    }
}

/* Media Query 2: Small Landscape (≤ 767px) */
@media (orientation: landscape) and (max-width: 767px) {
    .button-group {
        flex-direction: row;
        gap: 0.2rem;
        justify-content: space-between;
    }

    .button-primary,
    .button-secondary {
        flex: 1 1 50%;
        max-width: calc(50% - 0.1rem);
        padding: 0.15rem 0.3rem;
        font-size: 0.8rem;
        min-height: 1.5rem;
        border-radius: 4px;
    }

    .button-outline {
        flex: 1 1 50%;
        max-width: calc(50% - 0.1rem);
        padding: 0.15rem 0.3rem;
        font-size: 0.8rem;
        min-height: 1.5rem;
        border-radius: 4px;
    }

    .tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }

    .badge-overlay::before {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        top: 30%;
        left: -20%;
        width: 140%;
        transform: rotate(-12deg);
    }

    .note-text {
        font-size: 0.7rem;
    }

    .feature-icon {
        height: 25px;
    }
}

/* Media Query 3: Tablets and Medium Screens (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .button-group {
        gap: 0.5rem;
    }

    .button-primary,
    .button-secondary {
        padding: 0.5rem;
        font-size: 0.8rem;
        min-height: 34px;
    }

    .button-outline {
        min-width: 200px;
        max-width: 250px;
        padding: 0.5rem;
        font-size: 0.8rem;
        min-height: 34px;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
    }

    .badge-overlay::before {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
        transform: rotate(-20deg);
        width: 130%;
        left: -15%;
    }

    .note-text {
        font-size: 0.85rem;
    }

    .feature-icon {
        height: 35px;
    }
}

/* Media Query 4: Tablet Landscape (768px - 1023px) */
@media (orientation: landscape) and (min-width: 768px) and (max-width: 1023px) {
    .button-group {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: space-between;
    }

    .button-primary,
    .button-secondary {
        padding: 0.5rem;
        font-size: 0.8rem;
        min-height: 34px;
    }

    .button-outline {
        padding: 0.5rem;
        font-size: 0.8rem;
        min-height: 34px;
    }

    .tag {
        font-size: 0.75rem;
    }

    .badge-overlay::before {
        font-size: 0.8rem;
        width: 130%;
        left: -15%;
    }

    .note-text {
        font-size: 0.85rem;
    }

    .feature-icon {
        height: 35px;
    }
}

/* Media Query 5: Larger Screens (≥ 1024px) */
@media (min-width: 1024px) {
    .button-group {
        flex-direction: row;
        gap: 1rem;
        max-width: 800px;
        padding: 0 1rem;
    }

    .button-primary,
    .button-secondary {
        flex: 1 1 calc(33.33% - 0.5rem);
        width: calc(33.33% - 0.5rem);
        padding: 0.8rem;
        font-size: 1.2rem;
        min-height: 52px;
        border-radius: 10px;
    }

    .button-outline {
        flex: 1 1 calc(33.33% - 0.5rem);
        width: calc(33.33% - 0.5rem);
        padding: 0.8rem;
        font-size: 1.2rem;
        min-height: 52px;
        border-radius: 10px;
    }

    .tag {
        font-size: 1.2rem;
        padding: 0.45rem 0.8rem;
    }

    .badge-overlay::before {
        font-size: 1.4rem;
        padding: 0.9rem 1.2rem;
        width: 130%;
        left: -15%;
    }

    .note-text {
        font-size: 1rem;
    }

    .feature-icon {
        height: 50px;
    }
}