﻿html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    background-color: #f5f5f5;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.validation-summary {
    background: #ffecec;
    border: 1px solid #f5aca6;
    padding: .75rem 1rem;
    border-radius: 6px;
    color: #b30000;
}

    .validation-summary ul {
        margin: .5rem 0 0 1.2rem;
        padding: 0;
    }

    .validation-summary li {
        margin-bottom: .4rem;
    }

.notice-success {
    background: #e6ffed;
    border: 1px solid #34c759;
    color: #245e2d;
    padding: .6rem .9rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.loading {
    opacity: .6;
    pointer-events: none;
}
/* Added basic layout and typography for index page */
.page__index {
    background-color: #f4f4e9;
    line-height: 1.6;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", Arial, sans-serif;
    color: #222;
    font-size: 1.25rem;
    line-height: 2;
}

    .page__index h1 {
        font-size: clamp(1.8rem, 4vw, 2.4rem);
        margin: 3rem 0;
    }

    .page__index h2 {
        font-size: clamp(1.4rem, 3vw, 1.8rem);
        margin: 2.5rem 0 1.5rem;
    }

    .page__index p {
        margin: 0 0 2.5rem;
    }

    .page__index ol, .page__index ul {
        margin: 0 0 1.25rem 1.25rem;
        padding: 0;
    }

        .page__index ol li, .page__index ul li {
            margin-bottom: .75rem;
        }

    .page__index #banner {
        background-color: #002a97;
        text-align: center;
    }

    .page__index #intro {
        width: min(100%,62.5rem);
        padding: 2.5rem 0 3.5rem;
        margin: 0 auto;
    }

        .page__index #intro .initiators {
            display: flex;
            flex-wrap: wrap;
            gap: .5rem .75rem;
        }

            .page__index #intro .initiators .initiator {
            }

    .page__index #petition form > div {
        margin-bottom: .75rem;
    }

    .page__index label {
        font-weight: 600;
        display: block;
        margin-bottom: .25rem;
    }

    .page__index input[type="text"],
    .page__index input[type="email"],
    .page__index select,
    .page__index textarea {
        width: 100%;
        box-sizing: border-box;
        padding: .5rem .6rem;
        border: 1px solid #bbb;
        border-radius: 4px;
        font: inherit;
        background: #fff;
    }

    .page__index button[type="submit"] {
        background: #004d9e;
        color: #fff;
        border: none;
        padding: .65rem 1.2rem;
        font-size: 1rem;
        border-radius: 4px;
        cursor: pointer;
    }

        .page__index button[type="submit"]:hover {
            background: #0067cf;
        }

    .page__index .initiators {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem .75rem;
        margin-top: .5rem;
        align-items: center;
    }

        .page__index .initiators .initiator img {
            display: inline-block;
            height: 36px;
            width: auto;
            margin-right: .35rem;
        }

        .page__index .initiators .initiator span {
            vertical-align: middle;
        }

    .page__index #petition {
        background-color: #e1e7ef;
        width: 100%;
        padding: 1.5rem 0 1.5rem;
        margin: 0 auto;
    }

        .page__index #petition h2 {
            text-align: center;
        }

        .page__index #petition #petitionForm {
            width: min(100%,32.5rem);
            margin: 0 auto 2.5rem;
            display: grid;
            gap: 1rem;
            font-size: 1.25rem;
        }

        .page__index #petition .validation-summary {
            margin: 2.5rem auto;
        }

        .page__index #petition #globalMessage {
            margin: 2.5rem auto;
        }

        .page__index #petition #petitionInfo {
            display: grid;
            justify-items: center;
            gap: 1rem;
            padding: 2.5rem 1rem;
        }

            .page__index #petition #petitionInfo h3 {
                font-size: 1.5rem;
                margin: 0;
            }

            .page__index #petition #petitionInfo > p {
                width: min(100%,32.5rem);
                font-size: 1.25rem;
                color: #555;
                text-align: center;
            }

            .page__index #petition #petitionInfo .count {
                background-color: #fff;
                width: min(100%,20rem);
                text-align: center;
                margin: 0 0 2rem;
            }

                .page__index #petition #petitionInfo .count h4 {
                    font-size: 2.25rem;
                    font-variant-numeric: tabular-nums;
                    margin: 0;
                }

            .page__index #petition #petitionInfo .progress-wrapper {
                width: min(100%,20rem);
                display: grid;
                gap: .4rem;
            }

            .page__index #petition #petitionInfo .progress-bar {
                position: relative;
                width: 100%;
                height: 1.1rem;
                background: #ddd;
                border-radius: 6px;
                overflow: hidden;
            }

            .page__index #petition #petitionInfo .progress-bar__fill {
                height: 100%;
                background: linear-gradient(90deg,#004d9e,#258cfb);
                width: 0;
                transition: width .6s ease;
            }

            .page__index #petition #petitionInfo .progress-text {
                font-size: 1.125rem;
                text-align: center;
                color: #333;
                margin: 1rem 0 1.5rem;
            }
            /* Share block styles (expanded) */
            .page__index #petition #petitionInfo .share-block {
                background: #fff;
                border: 1px solid #d8d8d8;
                border-radius: 10px;
                width: min(100%,28rem);
                padding: 1.25rem 1.25rem 1.35rem;
                display: grid;
                gap: 1rem;
                box-shadow: 0 3px 10px rgba(0,0,0,.08);
                text-align: center;
                margin: 0 auto 3rem
            }

                .page__index #petition #petitionInfo .share-block h3 {
                    margin: 0;
                    font-size: 1.25rem;
                }

                .page__index #petition #petitionInfo .share-block .share-buttons {
                    display: flex;
                    flex-wrap: wrap;
                    gap: .625rem;
                }

                .page__index #petition #petitionInfo .share-block .share-btn {
                    background: #004d9e;
                    color: #fff;
                    text-decoration: none;
                    border: none;
                    padding: .55rem .9rem;
                    font-size: .85rem;
                    line-height: 1.2;
                    border-radius: 5px;
                    cursor: pointer;
                    font-family: inherit;
                    transition: background .18s ease;
                }

                    .page__index #petition #petitionInfo .share-block .share-btn:hover {
                        background: #0067cf;
                    }

                .page__index #petition #petitionInfo .share-block .share-hint {
                    font-size: 1rem;
                    color: #555;
                }

#footer {
    background-color: #002a97;
    color: white;
    text-align: center;
    padding: 2.5rem 1rem 2.5rem;
}

    #footer p {
        margin: 0 0 1rem;
    }



@media (max-width: 600px) {
    .page__index .initiators .initiator img {
        height: 28px;
    }
}
