/* ============================================================
   RC VOTING 2026 - Reader's Choice Unified Voting Styles
   ============================================================
   Design Tokens (from nomination.css):
   - Accent Red: #D41B1B
   - Dark: #313131
   - Success Green: #4caf50
   - Background Gray: #f3f3f3 / #f4f5f7
   - Border Gray: #efefef
   - Focus Red: #b00020
   - Font: 'Roboto', sans-serif
   ============================================================ */

/* ---- Giveaway Banner ---- */
.rc-giveaway-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border: 1px solid #D41B1B;
    border-radius: 5px;
    padding: 20px 25px;
    margin-bottom: 30px;
}
.rc-giveaway-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    border: 2px solid #D41B1B;
}
.rc-giveaway-text {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #313131;
}
.rc-giveaway-text strong {
    color: #D41B1B;
}

/* ---- Main Layout ---- */
.rc-voting-layout {
    display: flex;
    gap: 30px;
    position: relative;
    padding-bottom: 40px;
}

/* ---- Sticky Top Progress Bar ---- */
#rc-progress-bar {
    position: sticky;
    top: 95px;
    left: 0;
    right: 0;
    background: #313131;
    color: #fff;
    padding: 14px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 9999;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    margin-bottom: 25px;
    border-radius: 5px;
}

.rc-progress-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
}
.rc-progress-label {
    font-size: 15px;
    font-weight: 500;
}
.rc-progress-label #rc-progress-count {
    color: #D41B1B;
    font-weight: 700;
    font-size: 18px;
}
.rc-progress-entries {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 4px;
}
.rc-progress-entries svg {
    opacity: 0.8;
}

/* Progress track with tick marks */
#rc-progress-track {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    overflow: visible;
    position: relative;
}
#rc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #D41B1B 0%, #ff4444 100%);
    border-radius: 6px;
    transition: width 0.4s ease;
    width: 0%;
    position: relative;
    z-index: 1;
}

/* Tick marks on the progress bar */
.rc-tick {
    position: absolute;
    top: -3px;
    width: 3px;
    height: 18px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 1px;
    z-index: 2;
    transform: translateX(-50%);
    transition: background 0.3s ease;
}
.rc-tick.rc-tick-first {
    width: 4px;
    height: 20px;
    top: -4px;
    background: rgba(255, 255, 255, 0.5);
}
.rc-tick.reached {
    background: #4caf50;
}
.rc-tick.rc-tick-first.reached {
    background: #4caf50;
}

#rc-review-btn {
    background: #D41B1B;
    color: #fff;
    border: 0;
    border-radius: 3px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
#rc-review-btn:hover {
    background: #b00020;
}
#rc-review-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---- Entry Earned Celebration Message ---- */
.rc-entry-earned {
    position: absolute;
    bottom: -44px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: #fff;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 20px;
    letter-spacing: 0.3px;
    border-radius: 0 0 5px 5px;
    animation: rc-slideDown 0.4s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}
.rc-entry-fade {
    opacity: 0;
    transition: opacity 0.5s ease;
}
@keyframes rc-slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ---- Confetti Animation ---- */
.rc-confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 99998;
    overflow: hidden;
}
.rc-confetti-piece {
    position: absolute;
    top: -20px;
    animation: rc-confetti-fall linear forwards;
    pointer-events: none;
}
@keyframes rc-confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) rotate(180deg) scale(1.1);
        opacity: 1;
    }
    75% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(105vh) rotate(720deg) scale(0.5);
        opacity: 0;
    }
}

/* ---- Category Navigation (Sidebar) ---- */
#rc-category-nav {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.rc-nav-title {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #313131;
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #D41B1B;
}

.rc-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #efefef;
    border-radius: 5px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #313131;
    text-decoration: none;
    background: #fff;
}
.rc-category-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-color: #ccc;
    text-decoration: none;
    color: #313131;
}
.rc-category-item.active {
    border-color: #D41B1B;
    color: #D41B1B;
    font-weight: 500;
    background: #fff5f5;
}
.rc-category-item.complete {
    border-color: #4caf50;
    background: #f9fff9;
    font-weight: 700;
    color: #4caf50;
}
.rc-category-item.complete:hover {
    color: #4caf50;
}
.rc-category-item.complete.active {
    border-color: #4caf50;
    color: #4caf50;
    background: #f0fff0;
}
.rc-cat-check {
    color: #4caf50;
    font-weight: 700;
    margin-left: 4px;
}
.rc-cat-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rc-cat-count {
    font-size: 12px;
    font-weight: 500;
    color: #999;
    margin-left: 8px;
    white-space: nowrap;
}
.rc-category-item.active .rc-cat-count {
    color: #D41B1B;
}
.rc-category-item.complete .rc-cat-count {
    color: #4caf50;
}

/* ---- Voting Area ---- */
#rc-voting-area {
    flex: 1;
    min-width: 0;
}

.rc-section-title {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #313131;
    margin: 0 0 25px 0;
    padding: 0 0 12px 0;
    border-bottom: 2px solid #efefef;
}

/* ---- Subcategory Sections ---- */
.rc-subcategory-section {
    margin-bottom: 35px;
}
.rc-sub-title {
    font-family: 'Roboto', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #D41B1B;
    text-transform: uppercase;
    margin: 0 0 15px 0;
    letter-spacing: 0.5px;
}

/* ---- Business Card Grid ---- */
.rc-business-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 10px;
}

.rc-business-card {
    box-sizing: border-box;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #efefef;
    transition: all 0.3s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}
.rc-business-card:hover {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}
.rc-business-card.voted {
    border-color: #4caf50;
    background: #f9fff9;
}

/* ---- Business Card Badges ---- */
.rc-badge {
    display: inline-block;
    font-family: 'Roboto', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
    align-self: flex-start;
}
.rc-badge-winner {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
}
.rc-badge-pick {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.rc-biz-name {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #313131;
    margin-bottom: 4px;
}
.rc-biz-address {
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
    flex: 1;
}

/* Vote Button */
.rc-vote-btn {
    width: 100%;
    height: 38px;
    background: #313131;
    border: 0;
    border-radius: 3px;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}
.rc-vote-btn:hover {
    background: #D41B1B;
}
.rc-vote-btn.voted {
    background: #4caf50;
}
.rc-vote-btn.voted:hover {
    background: #388e3c;
}

/* "Add a Business" Card */
.rc-add-new {
    border: 2px dashed #ccc;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    min-height: 130px;
    transition: all 0.3s ease;
}
.rc-add-new:hover {
    border-color: #D41B1B;
    background: #fff5f5;
}
.rc-add-new .rc-biz-name {
    color: #666;
    font-weight: 400;
}
.rc-add-new .rc-biz-address {
    flex: 0;
    margin-bottom: 0;
}
.rc-add-icon {
    font-size: 32px;
    color: #D41B1B;
    margin-bottom: 5px;
    font-weight: 300;
    line-height: 1;
}

/* ---- Add a Business Row ---- */
.rc-add-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.rc-add-row .rc-add-new {
    min-height: 120px;
}
.rc-add-row-hint {
    display: flex;
    align-items: center;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #999;
    font-style: italic;
    padding: 0 10px;
    grid-column: 2 / -1;
}

/* ---- Google Places Search Modal ---- */
#rc-places-search {
    max-width: 600px;
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
}
.rc-places-title {
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #313131;
    margin: 0 0 5px 0;
}
.rc-places-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #888;
    margin: 0 0 15px 0;
}
.rc-places-context {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    color: #666;
    margin: 0 0 15px 0;
    padding: 10px 15px;
    background: #f4f5f7;
    border-radius: 3px;
}
.rc-places-context strong {
    color: #D41B1B;
}

#rc-places-input {
    width: 100%;
    height: 46px;
    border: 1px solid #e3e3e3;
    border-radius: 3px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    padding: 0 20px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}
#rc-places-input:focus {
    border-color: #b00020;
}

#rc-places-results {
    margin-top: 10px;
    max-height: 350px;
    overflow-y: auto;
}

.rc-places-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #efefef;
    cursor: pointer;
    transition: background 0.2s;
}
.rc-places-result-item:hover {
    background: #f4f5f7;
}
.rc-places-result-item:last-child {
    border-bottom: none;
}
.rc-places-name {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #313131;
}
.rc-places-addr {
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.rc-places-loading,
.rc-places-error,
.rc-places-empty {
    padding: 20px;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #888;
}
.rc-places-error {
    color: #D41B1B;
}

/* ---- Review Modal ---- */
#rc-review-modal {
    max-width: 700px;
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
}
.rc-review-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #efefef;
}
.rc-review-title {
    font-family: 'Roboto', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #313131;
    margin: 0 0 8px 0;
}
.rc-review-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #666;
    margin: 0;
}
.rc-review-subtitle strong {
    color: #D41B1B;
}

.rc-review-cat {
    font-family: 'Roboto', sans-serif;
    color: #D41B1B;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 20px 0 8px;
    letter-spacing: 0.5px;
}
.rc-review-cat:first-child {
    margin-top: 0;
}

.rc-review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f3f3;
    font-family: 'Roboto', sans-serif;
}
.rc-review-item:last-child {
    border-bottom: none;
}
.rc-review-sub {
    font-size: 13px;
    color: #888;
    margin-right: 8px;
}
.rc-review-biz {
    font-size: 14px;
    font-weight: 500;
    color: #313131;
    flex: 1;
}
.rc-review-edit {
    background: none;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 4px 14px;
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    margin-left: 10px;
}
.rc-review-edit:hover {
    border-color: #D41B1B;
    color: #D41B1B;
}

.rc-review-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #efefef;
}
.rc-review-note {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    color: #888;
    margin: 0 0 15px 0;
    text-align: center;
}
.rc-review-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Review modal buttons */
.rc-btn-primary {
    background: #D41B1B;
    color: #fff;
    border: 0;
    border-radius: 3px;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.5px;
}
.rc-btn-primary:hover {
    background: #b00020;
}
.rc-btn-secondary {
    background: #fff;
    color: #313131;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Roboto', sans-serif;
}
.rc-btn-secondary:hover {
    border-color: #313131;
    background: #f4f5f7;
}

/* ---- Success Message ---- */
#rc-vote-received {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
#rc-vote-received .vote_received {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #313131;
    margin-top: 20px;
}
.rc-entries-message {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #666;
    margin-top: 10px;
}
.rc-entries-message strong {
    color: #D41B1B;
    font-size: 20px;
}

/* ---- Closed / Login States ---- */
.rc-closed-message {
    text-align: center;
    padding: 60px 30px;
}
.rc-closed-message h2 {
    font-family: 'Roboto', sans-serif;
    color: #313131;
}
.rc-closed-message p {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #666;
    max-width: 500px;
    margin: 15px auto;
}

/* ---- Voted checkmark indicator on card ---- */
.rc-business-card.voted .rc-biz-name::after {
    content: ' \2713';
    color: #4caf50;
    font-weight: 700;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet: 1024px */
@media (max-width: 1024px) {
    .rc-voting-layout {
        flex-direction: column;
    }

    #rc-category-nav {
        width: 100%;
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 20px;
    }

    .rc-nav-title {
        width: 100%;
        margin-bottom: 10px;
        font-size: 16px;
    }

    .rc-category-item {
        flex: 0 0 auto;
        min-width: 120px;
        font-size: 13px;
        padding: 8px 14px;
        margin-bottom: 0;
    }

    .rc-business-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rc-add-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .rc-add-row-hint {
        grid-column: auto;
    }

    .rc-section-title {
        font-size: 20px;
    }
}

/* Mobile: 768px */
@media (max-width: 768px) {
    .rc-business-grid {
        grid-template-columns: 1fr;
    }

    .rc-category-item {
        min-width: 100px;
        font-size: 12px;
        padding: 6px 12px;
    }

    .rc-giveaway-banner {
        flex-direction: column;
        text-align: center;
        padding: 15px 20px;
    }

    .rc-section-title {
        font-size: 18px;
    }

    .rc-add-row {
        grid-template-columns: 1fr;
    }
    .rc-add-row-hint {
        grid-column: auto;
        justify-content: center;
        padding: 8px 0;
    }

    .rc-review-actions {
        flex-direction: column;
    }
    .rc-btn-primary,
    .rc-btn-secondary {
        width: 100%;
        text-align: center;
    }
}

/* Small Mobile: 660px */
@media (max-width: 660px) {
    #rc-progress-bar {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px 16px;
        border-radius: 0;
    }

    .rc-progress-info {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        min-width: auto;
    }

    #rc-progress-track {
        width: 100%;
        margin-bottom: 4px;
    }

    #rc-review-btn {
        width: 100%;
        text-align: center;
        margin-top: 4px;
    }

    .rc-entry-earned {
        bottom: auto;
        top: 100%;
        border-radius: 0 0 5px 5px;
        font-size: 14px;
        padding: 10px 15px;
    }

    .rc-add-row {
        grid-template-columns: 1fr;
    }
    .rc-add-row-hint {
        grid-column: auto;
        justify-content: center;
        padding: 8px 0;
    }

    #rc-places-search,
    #rc-review-modal {
        padding: 20px;
    }

    .rc-review-item {
        flex-wrap: wrap;
        gap: 5px;
    }
    .rc-review-edit {
        margin-left: 0;
    }
}
