/* ======================================================================
   app.css -- VotumVela application styles
   Loaded after site.css; uses vv- prefix to avoid template collisions.

   STRUCTURE:
     1. Theme variables (scoped to .vv-public-list, content area only)
     2. Public list view styles (theme-overridable via CSS variables)
     3. Owner dashboard styles (permanent, not theme-overridable)
     4. Shared components (alerts, badges, form sections, tables, etc.)
   ====================================================================== */


/* ======================================================================
   1. THEME VARIABLES
   Scoped to .vv-public-list so they NEVER affect site chrome
   (header, nav, footer). Theme CSS files override these defaults.
   ====================================================================== */

.vv-public-list {
    --vv-primary: #900C3F;
    --vv-accent: #E9B824;
    --vv-bg: transparent;
    --vv-card-bg: #ffffff;
    --vv-card-border: #eeeeee;
    --vv-text: #333333;
    --vv-text-muted: #777777;
    --vv-text-light: #aaaaaa;
    --vv-success: #27ae60;
    --vv-info: #1976d2;
    --vv-warning: #f59e0b;
    --vv-danger: #e74c3c;
    --vv-radius: 8px;
    --vv-hero-overlay: rgba(0, 0, 0, 0.3);
    --vv-font: inherit;

    font-family: var(--vv-font);
    background: var(--vv-bg);
}


/* ======================================================================
   2. PUBLIC LIST VIEW STYLES (theme-overridable)
   Used on Share.cshtml and BuyerView.cshtml.
   All colors reference var(--vv-*) so theme CSS can override.
   ====================================================================== */

/* Event info panel on shared view */
.vv-event-panel {
    background: var(--vv-card-bg);
    border-radius: var(--vv-radius);
    padding: 20px 24px;
    margin-bottom: 32px;
}

.vv-event-panel h3 {
    margin-bottom: 8px;
    color: var(--vv-text);
}

.vv-event-panel p {
    color: var(--vv-text-muted);
    margin-bottom: 6px;
}

/* Ship-to address card */
.vv-ship-to {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--vv-card-bg);
    border-radius: 6px;
    border: 1px solid var(--vv-card-border);
}

.vv-ship-to .vv-ship-label {
    font-weight: 600;
    margin-bottom: 4px;
}

.vv-ship-to p {
    margin: 0;
}

/* Item card in public list */
.vv-item-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vv-item-card {
    background: var(--vv-card-bg);
    border: 1px solid var(--vv-card-border);
    border-radius: var(--vv-radius);
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.vv-item-card.vv-purchased {
    opacity: 0.65;
}

.vv-item-card .vv-item-body {
    flex: 1;
}

.vv-item-card .vv-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.vv-item-card .vv-item-header h4 {
    margin: 0;
    color: var(--vv-text);
}

.vv-item-card .vv-item-price {
    color: var(--vv-text-muted);
    margin-bottom: 8px;
}

/* Guest purchase form inside item card */
.vv-guest-form {
    margin-top: 12px;
    background: var(--vv-card-bg);
    border: 1px solid var(--vv-card-border);
    padding: 14px;
    border-radius: 6px;
}

.vv-guest-form .vv-guest-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.vv-guest-form label {
    font-size: 12px;
    color: var(--vv-text-muted);
    display: block;
    margin-bottom: 3px;
}

.vv-guest-form input[type="text"],
.vv-guest-form input[type="email"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--vv-card-border);
    border-radius: 4px;
    font-size: 13px;
}

.vv-guest-form .vv-guest-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vv-guest-form .vv-guest-actions label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--vv-text-muted);
}

/* Powered-by footer on public views */
.vv-powered-by {
    margin-top: 40px;
    font-size: 12px;
    color: var(--vv-text-light);
    text-align: center;
}

.vv-powered-by a {
    color: var(--vv-text-light);
}


/* ======================================================================
   3. OWNER DASHBOARD STYLES (permanent, not theme-overridable)
   Used on Index, Details, Create, Edit, and management views.
   ====================================================================== */

/* White panel container */
.vv-panel {
    background: #ffffff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 30px;
    margin-bottom: 24px;
}

.vv-panel-narrow {
    max-width: 700px;
}

.vv-panel-header {
    margin-bottom: 24px;
}

.vv-panel-header h3 {
    margin-bottom: 8px;
}

.vv-panel-header p {
    color: #555;
    font-size: 14px;
}

/* Dashboard list cards (for Index pages showing user's lists/events) */
.vv-list-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vv-list-card {
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.vv-list-card:hover {
    border-color: var(--main-color);
}

.vv-list-card .vv-list-name {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.vv-list-card .vv-list-meta {
    font-size: 1.4rem;
    color: #777;
    margin-top: 4px;
}

.vv-list-card .vv-list-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 1.5rem;
}

.vv-list-card .vv-list-actions a {
    color: var(--secondary-color);
}

.vv-list-card .vv-list-actions a:hover {
    color: var(--main-color);
}

/* Muted card for canceled/inactive events */
.vv-list-card.vv-list-card-muted {
    opacity: 0.55;
    border-color: #ddd;
}

.vv-list-card.vv-list-card-muted:hover {
    border-color: #ccc;
}

/* Detail definition list */
.vv-detail-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px 20px;
    margin-bottom: 24px;
}

.vv-detail-grid dt {
    font-weight: 600;
    color: #333;
    font-size: 1.5rem;
}

.vv-detail-grid dd {
    color: #555;
    font-size: 1.5rem;
    margin: 0;
}

/* Data table (for linked lists, items, coordinator grants, etc.) */
.vv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.vv-table thead tr {
    border-bottom: 2px solid #eee;
    text-align: left;
}

.vv-table th {
    padding: 10px 12px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.vv-table td {
    padding: 12px;
    font-size: 1.5rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.vv-table tbody tr:last-child td {
    border-bottom: none;
}

/* Sharing toggle bar */
.vv-share-bar {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.vv-share-on {
    color: #27ae60;
}

.vv-share-off {
    color: #aaa;
}

.vv-share-url {
    font-size: 12px;
    color: #555;
    font-family: monospace;
}

.vv-share-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
}

.vv-share-toggle.vv-stop {
    color: #e74c3c;
}

/* Items list on owner Details view */
.vv-items-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.vv-items-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
}

.vv-items-list li:last-child {
    border-bottom: none;
}

.vv-items-list .vv-item-title {
    flex: 1;
    color: #333;
}

.vv-items-list .vv-item-note {
    color: #999;
    font-size: 1.3rem;
}

.vv-items-list .vv-item-actions a {
    color: var(--secondary-color);
    font-size: 1.4rem;
}

.vv-items-list .vv-item-actions a:hover {
    color: var(--main-color);
}


/* ======================================================================
   4. SHARED COMPONENTS
   ====================================================================== */

/* Alert banners */
.vv-alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 24px;
    font-size: 1.5rem;
    border-left: 4px solid transparent;
}

.vv-alert-success {
    background: #f0fdf4;
    border-left-color: #27ae60;
    color: #333;
}

.vv-alert-error {
    background: #fdecea;
    border-left-color: #e74c3c;
    color: #333;
}

.vv-alert-warning {
    background: #fff8e1;
    border-left-color: #f59e0b;
    color: #333;
}

.vv-alert-info {
    background: #e3f2fd;
    border-left-color: #1976d2;
    color: #333;
}

/* Status badges */
.vv-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
}

.vv-badge-success {
    background: #e8f5e9;
    color: #27ae60;
}

.vv-badge-info {
    background: #e3f2fd;
    color: #1976d2;
}

.vv-badge-warning {
    background: #fff8e1;
    color: #d97706;
}

.vv-badge-danger {
    background: #fdecea;
    color: #e74c3c;
}

.vv-badge-muted {
    background: #f0f0f0;
    color: #777;
}

/* Empty state placeholder */
.vv-empty-state {
    color: #777;
    text-align: center;
    padding: 40px 0;
    font-size: 1.5rem;
}

/* Form sections */
.vv-form-section {
    margin-bottom: 24px;
}

.vv-form-section h4 {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.vv-form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* Link styled as back-nav */
.vv-back-link {
    color: #777;
    font-size: 14px;
}

.vv-back-link:hover {
    color: var(--main-color);
}

/* Action button row */
.vv-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

/* Delete button disguised as link (for inline delete forms) */
.vv-delete-link {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.4rem;
    padding: 0;
}

.vv-delete-link:hover {
    color: #c0392b;
}


/* ======================================================================
   5. OWNER DETAILS -- SECTIONED LAYOUT
   Used on WishList/Details.cshtml (Option C redesign).
   ====================================================================== */

/* Hero header with list name, badges, and stats */
.vv-details-hero {
    background: #ffffff;
    border-radius: 10px;
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.vv-details-hero .vv-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.vv-details-hero .vv-hero-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 6px;
}

.vv-details-hero .vv-hero-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 1.4rem;
    color: #777;
}

.vv-details-hero .vv-hero-meta i {
    margin-right: 4px;
}

.vv-stat-row {
    display: flex;
    gap: 32px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.vv-stat {
    text-align: center;
}

.vv-stat .vv-stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: block;
}

.vv-stat .vv-stat-label {
    font-size: 1.2rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Action toolbar */
.vv-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.vv-toolbar .btn {
    font-size: 1.3rem;
    padding: 8px 16px;
}

.vv-toolbar .vv-btn-outline {
    background: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    padding: 8px 16px;
    font-size: 1.3rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
}

.vv-toolbar .vv-btn-outline:hover {
    background: var(--secondary-color);
    color: #fff;
}

/* Collapsible sections */
.vv-section {
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.vv-section-header {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
}

.vv-section-header h3 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vv-section-header h3 i {
    color: var(--main-color);
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
}

.vv-section-header .vv-section-count {
    font-size: 1.3rem;
    color: #999;
}

.vv-section-body {
    padding: 0 24px 24px;
}

/* Owner item card grid */
.vv-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.vv-owner-card {
    border: 1px solid #eee;
    border-radius: var(--vv-radius, 8px);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.vv-owner-card:hover {
    border-color: var(--main-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.vv-owner-card .vv-card-img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #f8f8f8;
    display: block;
}

.vv-owner-card .vv-card-placeholder {
    width: 100%;
    height: 180px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 40px;
}

.vv-owner-card .vv-card-body {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vv-owner-card .vv-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vv-owner-card .vv-card-retailer {
    font-size: 1.2rem;
    color: #999;
    margin-bottom: 8px;
}

.vv-owner-card .vv-card-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.vv-owner-card .vv-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.vv-owner-card .vv-card-footer a,
.vv-owner-card .vv-card-footer button {
    font-size: 1.3rem;
}

/* Message board feed */
.vv-message-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vv-message-item {
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid var(--main-color);
}

.vv-message-item .vv-msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.vv-message-item .vv-msg-author {
    font-weight: 600;
    font-size: 1.4rem;
    color: #333;
}

.vv-message-item .vv-msg-date {
    font-size: 1.2rem;
    color: #aaa;
}

.vv-message-item .vv-msg-text {
    font-size: 1.4rem;
    color: #555;
    line-height: 1.5;
}

.vv-message-item .vv-msg-actions {
    margin-top: 6px;
}

/* Inline post form */
.vv-post-form {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.vv-post-form input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.4rem;
}

.vv-post-form button {
    padding: 10px 20px;
    font-size: 1.3rem;
}

/* Share panel inline */
.vv-share-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.vv-share-panel .vv-share-url {
    background: #f5f5f5;
    padding: 8px 14px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    color: #555;
    word-break: break-all;
}

/* Event info mini-card */
.vv-event-mini {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 16px;
    font-size: 1.4rem;
}

.vv-event-mini dt {
    font-weight: 600;
    color: #555;
}

.vv-event-mini dd {
    color: #333;
    margin: 0;
}

/* Coordinator/co-owner avatar list */
.vv-people-list {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.vv-person-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 1.3rem;
    color: #555;
}

.vv-person-chip i {
    color: var(--main-color);
}

/* Theme-aware overrides: when items section is inside .vv-public-list,
   owner cards inherit the theme's color palette. */
.vv-public-list .vv-owner-card {
    border-color: var(--vv-card-border);
    background: var(--vv-card-bg);
}

.vv-public-list .vv-owner-card:hover {
    border-color: var(--vv-primary);
}

.vv-public-list .vv-owner-card .vv-card-title {
    color: var(--vv-text);
}

.vv-public-list .vv-owner-card .vv-card-retailer {
    color: var(--vv-text-muted);
}

.vv-public-list .vv-owner-card .vv-card-price {
    color: var(--vv-primary);
}

.vv-public-list .vv-owner-card .vv-card-footer {
    border-top-color: var(--vv-card-border);
}

.vv-public-list .vv-owner-card .vv-card-footer a {
    color: var(--vv-primary);
}

.vv-public-list .vv-section-header h3 i {
    color: var(--vv-primary);
}


/* ======================================================================
   6. LOGO SVG OVERRIDES
   The template's .logo img sets height:5rem + object-fit:cover.
   SVGs need width:auto so the aspect ratio is preserved.
   ====================================================================== */

.logo .logo-svg {
    height: 4.5rem;
    width: auto;
    object-fit: contain;
}

/* Footer logo can be slightly larger to show tagline clearly */
.footer .logo .logo-svg {
    height: 5.5rem;
}

.footer .logo {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.footer .logo-tagline {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 1.4rem;
    color: #9ca3af;
    letter-spacing: 2px;
}

/* Fire Horse Software banner in footer copyright bar */
.footer .content {
    background-color: #000000 !important;
    padding: 0.4rem 0 !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.footer .content .fhs-banner-logo {
    height: 12rem;
    width: auto;
    display: block;
}

.footer .content p {
    font-size: 1.4rem !important;
    color: #9ca3af !important;
    margin: 0 !important;
    padding: 0 0 0.3rem 0;
}


/* ======================================================================
   7. HEADER-1 BRANDING OVERRIDES
   White top bar with logo left, social icons right.
   Overrides template's secondary-color background and white icon colors.
   ====================================================================== */

.header .header-1 {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.8rem 5%;
}

.header .header-1 .logo .logo-svg {
    height: 6.25rem;
}

/* Logo + tagline side by side */
.header .header-1 .logo {
    align-items: center;
    gap: 1.5rem;
}

.header .header-1 .logo-tagline {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 2.4rem;
    color: #6b7280;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* Social icons: brand blue on white background */
.header .header-1 .social-contacts li a {
    color: #2563eb;
}

.header .header-1 .social-contacts li a:hover {
    color: #1d4ed8;
}

/* On scroll, show compact logo in the nav bar */
.header.active .header-1 {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 0.4rem 5%;
}

.header.active .header-1 .logo .logo-svg {
    height: 4.4rem;
}

.header.active .header-1 .logo-tagline {
    display: none;
}
