﻿/* ================================
   Handicap Calculator Styles
================================ */

/* ===== Container Card ===== */
.chc-widget {
    max-width: 360px;
    margin: 0 auto;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    text-align: center;
}

    /* ===== Title ===== */
    .chc-widget h4 {
        margin-bottom: 18px;
        font-size: 22px;
        color: #0f5132;
    }

/* ===== Input Grid ===== */
.chc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

    .chc-grid label {
        font-size: 15px;
        color: #334155;
        display: block;
        text-align: left;
    }

    .chc-grid input {
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

        .chc-grid input:focus {
            outline: none;
            border-color: #2e8b57;
            box-shadow: 0 0 0 2px rgba(46, 139, 87, 0.25);
        }

/* ===== Calculate Button ===== */
.chc-button {
    display: inline-block;
    width: 100%;
    padding: 12px 0;
    font-weight: 600;
    background: #2e8b57; /* Unified Lee Valley green */
    color: #ffffff;
    border-radius: 8px;
    border-left: 4px solid #2e8b57;
    border-right: 4px solid #2e8b57;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

    /* Gradient shine hover */
    .chc-button::before,
    .chc-button::after {
        content: "";
        position: absolute;
        top: 0;
        height: 100%;
        width: 50%;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.5s ease;
        z-index: 1;
    }

    .chc-button::before {
        left: 0;
        background: linear-gradient(135deg, #2e8b57, #3aa170); /* subtle shine */
    }

    .chc-button::after {
        right: 0;
        left: auto;
        transform-origin: right;
        background: linear-gradient(120deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.15) 100%);
    }

    .chc-button:hover::before,
    .chc-button:hover::after {
        transform: scaleX(1) translateX(0);
    }

    .chc-button:hover {
        color: #ffffff;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(46, 139, 87, 0.35);
    }

/* ===== Results ===== */
.chc-results {
    margin-top: 15px;
}

/* Badge styling */
.chc-badge {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    margin: 8px 0;
    min-width: 220px;
    text-align: center;
    color: #ffffff;
    background-color: #2e8b57; /* unified Lee Valley green */
    box-shadow: 0 6px 15px rgba(46, 139, 87, 0.4);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

    /* Animate show */
    .chc-badge.show {
        opacity: 1;
        transform: translateY(0);
    }

/* Formula text */
.chc-formula {
    font-size: 13px;
    color: #0E7930;
    margin-top: 4px;
    text-align: center;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 480px) {
    .chc-widget {
        padding: 20px;
    }

    .chc-grid {
        grid-template-columns: 1fr;
    }

    .chc-badge {
        min-width: auto;
        width: 100%;
    }
}
