/* -------------------------------------------------------------
   GLOBAL WRAPPER / LAYOUT
-------------------------------------------------------------- */

.vi-sfr-fundraiser-container {
    margin: 0 auto;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* -------------------------------------------------------------
   CARD TEMPLATE LAYOUT (FULL FUNDRAISER PAGE)
-------------------------------------------------------------- */

.vi-sfr-template-card .vi-sfr-card-grid {
    max-width: 1080px;
    width: 100%;
    padding: 20px;

    display: grid;
    grid-template-columns: 2fr 1fr; /* Main content + sidebar */
    gap: 30px;
    margin: 0 auto;
}

.vi-sfr-template-card .vi-sfr-featured-image img {
    border-radius: 8px;
    margin-bottom: 20px;
}

.vi-sfr-template-card .vi-sfr-card-sidebar {
    position: sticky;
    top: 20px;
}

.vi-sfr-template-card .vi-sfr-card-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.vi-sfr-template-card .vi-sfr-summary-raised {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #5cb85c;
}
.vi-sfr-template-card .vi-sfr-summary-goal {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

/* RESPONSIVE CARD GRID */
@media (max-width: 1100px) {
    .vi-sfr-template-card .vi-sfr-card-grid {
        max-width: 95%;
    }
}
@media (max-width: 768px) {
    .vi-sfr-template-card .vi-sfr-card-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    .vi-sfr-template-card .vi-sfr-card-sidebar {
        position: static;
        top: auto;
    }
}

/* -------------------------------------------------------------
   GOAL BAR
-------------------------------------------------------------- */

.vi-sfr-goal-bar {
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.vi-sfr-progress {
    height: 30px;
    line-height: 30px;
    color: white;
    text-align: right;
    padding-right: 10px;
    font-weight: bold;
    background-color: #5cb85c;
    transition: width 0.5s ease-in-out;
}

.vi-sfr-goal-text {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.9em;
}

.vi-sfr-goal-text strong {
    font-size: 1.1em;
    color: #333;
}

/* -------------------------------------------------------------
   DONATION FORM (FULL + LITE)
-------------------------------------------------------------- */

.vi-sfr-donation-form-wrap {
    background: #ffffff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 30px;
}

/* If inside card sidebar */
.vi-sfr-template-card .vi-sfr-donation-form-wrap {
    border: none;
    padding: 0;
    margin-bottom: 0;
}

.vi-sfr-form-group {
    margin-bottom: 15px;
}

.vi-sfr-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.vi-sfr-form-group input[type="text"],
.vi-sfr-form-group input[type="email"],
.vi-sfr-form-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}

/* Amount + Tip Buttons */
.vi-sfr-amount-options,
.vi-sfr-tip-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.vi-sfr-amount-options button,
.vi-sfr-tip-options button {
    padding: 10px 15px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.2s;
}

.vi-sfr-amount-options button.selected,
.vi-sfr-tip-options button.selected {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Checkbox Toggle Group */
.vi-sfr-form-toggle-group {
    margin-top: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}
.vi-sfr-form-toggle-group label {
    display: block;
    font-weight: normal;
}

/* Total Charge */
.vi-sfr-total-amount {
    font-size: 1.5em;
    font-weight: bold;
    color: #3c763d;
    margin-top: 5px;
}

/* Submit Button */
.vi-sfr-submit-btn {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.2s;
}
.vi-sfr-submit-btn:hover {
    background: #005177;
}

/* -------------------------------------------------------------
   UPDATES
-------------------------------------------------------------- */

.vi-sfr-updates-list {
    list-style: none;
    padding: 0;
}

.vi-sfr-update-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    background: #fefefe;
}

.vi-sfr-update-item h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.2em;
}

.vi-sfr-update-item .vi-sfr-update-date {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
}

/* -------------------------------------------------------------
   SUPPORTERS LIST
-------------------------------------------------------------- */

.vi-sfr-supporters-list {
    list-style: none;
    padding: 0;
}

.vi-sfr-supporter-item {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

.vi-sfr-supporter-item:last-child {
    border-bottom: none;
}

.vi-sfr-supporter-name {
    font-weight: bold;
}

.vi-sfr-supporter-amount {
    color: #5cb85c;
    font-weight: bold;
}

/* -------------------------------------------------------------
   ALERTS
-------------------------------------------------------------- */

.vi-sfr-alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
    display: none;
}

.vi-sfr-alert.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.vi-sfr-alert.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* -------------------------------------------------------------
   LOADING OVERLAY + SPINNER
-------------------------------------------------------------- */

.vi-sfr-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.vi-sfr-loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0073aa;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* -------------------------------------------------------------
   LITE CARD TEMPLATE
-------------------------------------------------------------- */

.vi-sfr-lite-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    margin: 20px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    width: 100% !important;
    box-sizing: border-box;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.vi-sfr-lite-featured img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 16px;
}

.vi-sfr-lite-toggle {
    width: 100%;
    background: #004c80;
    color: #fff;
    padding: 10px;
    border: none;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 10px;
}

.vi-sfr-lite-story-content {
    display: none;
    padding: 8px 0;
}

.vi-sfr-lite-story-content.open {
    display: block;
}

.vi-sfr-lite-donation-box {
    margin: 20px 0;
}

.vi-sfr-lite-donor-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.vi-sfr-lite-donor-list li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding: 6px 0;
}

.vi-sfr-lite-update-item {
    border-bottom: 1px dashed #ccc;
    padding: 10px 0;
}

.vi-sfr-lite-update-item:last-child {
    border-bottom: none;
}

.vi-sfr-lite-update-date {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}
