/*
Theme Name:   Ramen Ruler (Blocksy child)
Theme URI:    https://www.ramenruler.com/
Description:  Blocksy child styled to match the Stitch homepage design — Tailwind via CDN with the project's design tokens.
Author:       Ramen Ruler
Template:     blocksy
Version:      1.1.0
Text Domain:  ramenruler
*/

/* ----------------------------------------------------------------
 * Almost everything is handled by Tailwind utility classes loaded
 * via the CDN in functions.php. This stylesheet only holds:
 *  - resets that Tailwind doesn't apply to legacy WP-generated HTML
 *  - the_content prose tweaks
 *  - the comment / submission form styling that Tailwind alone can't do
 * ---------------------------------------------------------------- */

/* Avoid double scrollbars / horizontal scroll on phones */
html, body { overflow-x: hidden; }

/* flag-icons sizing for inline country flags */
.ramenruler-flag {
    display: inline-block;
    width: 1.5em;
    height: 1.125em;
    vertical-align: -0.15em;
    border-radius: 2px;
    margin-right: 0.35em;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}
/* Large variant for the country-archive header */
.ramenruler-flag-xl {
    width: 2.25em;
    height: 1.7em;
    vertical-align: -0.25em;
    margin-right: 0.5em;
}
/* Compact variant for card tiles where we want the flag at ~2em */
.ramenruler-flag-lg {
    width: 2em;
    height: 1.5em;
    vertical-align: -0.2em;
}

/* Body font is set via tailwind.config + style block in functions.php */

/* ----------------------------------------------------------------
 * Submission form (rendered by the [ramen_submission_form] shortcode)
 * ---------------------------------------------------------------- */
.rr-submission-form {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    padding: 32px;
    border-radius: 1rem;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.rr-submission-form p { margin: 0 0 18px 0; }
.rr-submission-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: #334155;
}
.rr-submission-form .required { color: #d33; }
.rr-submission-form input[type=text],
.rr-submission-form input[type=email],
.rr-submission-form input[type=url],
.rr-submission-form input[type=file],
.rr-submission-form select,
.rr-submission-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}
.rr-submission-form input:focus,
.rr-submission-form select:focus,
.rr-submission-form textarea:focus {
    outline: none;
    border-color: #eebd2b;
    box-shadow: 0 0 0 3px rgba(238,189,43,0.15);
}
.rr-submission-form textarea { resize: vertical; min-height: 120px; }
.rr-submission-form .rr-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .rr-submission-form .rr-row-2 { grid-template-columns: 1fr; }
}

/* Contribute mode switch shown above the submission form */
.rr-contribute-switch {
    max-width: 720px;
    margin: 0 auto 24px auto;
}
.rr-switch-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 20px;
    margin: 0 0 12px 0;
    color: #111;
}
.rr-switch-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) {
    .rr-switch-options { grid-template-columns: 1fr; }
}
.rr-switch-card {
    display: block;
    padding: 16px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    color: #111;
    transition: border-color .15s, transform .15s;
}
.rr-switch-card:hover {
    border-color: #eebd2b;
    transform: translateY(-1px);
}
.rr-switch-active {
    border-color: #eebd2b;
    background: #fff9e5;
    cursor: default;
}
.rr-switch-label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.rr-switch-hint {
    display: block;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}
.rr-submit-btn {
    background: #eebd2b;
    color: #221d10;
    border: none;
    padding: 12px 28px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.rr-submit-btn:hover { filter: brightness(1.1); }
.rr-fineprint {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 8px;
}
.rr-submission-thanks {
    background: #fff7ed;
    border: 1px solid #eebd2b;
    color: #221d10;
    padding: 32px;
    border-radius: 1rem;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}
.rr-submission-error {
    background: #fee2e2;
    border: 1px solid #d33;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 720px;
    margin: 0 auto 16px;
}

/* ----------------------------------------------------------------
 * Star rating selector inside the WP comment form
 * ---------------------------------------------------------------- */
.comment-form-rating .rr-rating-input {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0;
}
.comment-form-rating input[type=radio] {
    appearance: none;
    -webkit-appearance: none;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}
.comment-form-rating label[for^="rr-rating-"] {
    cursor: pointer;
    font-size: 26px;
    color: #cbd5e1;
    padding: 0 4px;
    transition: color 0.1s;
}
.comment-form-rating input[type=radio]:checked ~ label,
.comment-form-rating label:hover,
.comment-form-rating label:hover ~ label {
    color: #eebd2b;
}

/* Star display in posted comments */
.rr-stars { font-size: 16px; line-height: 1; letter-spacing: 1px; color: #eebd2b; }
.rr-stars .star.empty { color: #cbd5e1; }
.rr-stars .star.half  { color: #eebd2b; opacity: 0.55; }
.rr-comment-rating { margin-bottom: 8px; }

/* ----------------------------------------------------------------
 * Default WP comment list/form needs minimal tweaks to fit dark/cream theme
 * ---------------------------------------------------------------- */
.commentlist, ol.comment-list { list-style: none; padding: 0; }
.commentlist > li, ol.comment-list > li {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}
#respond textarea, #respond input[type=text], #respond input[type=email], #respond input[type=url] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
}
#respond .submit, #respond input[type=submit] {
    background: #eebd2b;
    color: #221d10;
    border: none;
    padding: 10px 24px;
    border-radius: 9999px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.04em;
}
#respond .submit:hover { filter: brightness(1.1); }

/* ----------------------------------------------------------------
 * Pagination
 * ---------------------------------------------------------------- */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.page-numbers.current { background: #221d10; color: #eebd2b; border-color: #221d10; }
.page-numbers:hover:not(.current) { border-color: #eebd2b; color: #221d10; }
.page-numbers .material-symbols-outlined { font-size: 20px; }

/* ----------------------------------------------------------------
 * Utility — line-clamp where Tailwind doesn't kick in early
 * ---------------------------------------------------------------- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
