/* public/css/public-style.css */

.vi-sfr-fundraiser-container {
    /* REMOVED: max-width property to allow theme's content width to take over */
    margin: 0 auto;
    padding: 0; 
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* --- Card Template Specific Styles --- */
.vi-sfr-template-card .vi-sfr-card-grid {
    max-width: 1080px; /* NEW: Match target post width */
    width: 100%; /* Ensures responsiveness */
    padding: 20px; 
    
    display: grid;
    grid-template-columns: 2fr 1fr; /* Main content 2/3, Sidebar 1/3 */
    gap: 30px;
    margin: 0 auto; /* Center the card */
}

.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; /* Stick near the top when scrolling */
}

.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;
}

/* Card Responsiveness */
@media (max-width: 1100px) {
    /* If the screen is slightly larger than the grid max-width, adjust */
    .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; /* Adjust padding for mobile */
    }
    .vi-sfr-template-card .vi-sfr-card-sidebar {
        position: static;
        top: auto;
    }
}
/* --- End Card Template Styles --- */


/* 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; /* Green color for progress */
    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 */
.vi-sfr-donation-form-wrap {
    background: #ffffff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 30px;
}
.vi-sfr-template-card .vi-sfr-donation-form-wrap {
    /* Remove redundant border/padding if inside .vi-sfr-card-box */
    border: none;
    padding: 0;
    margin-bottom: 0;
}
.vi-sfr-donation-form-wrap h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.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;
}
.vi-sfr-tip-options, .vi-sfr-amount-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: white;
    border-color: #0073aa;
}
.vi-sfr-form-group .vi-sfr-custom-input {
    width: auto;
    max-width: 150px;
    margin-left: 10px;
}

/* Checkboxes/Toggles */
.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;
}

/* 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 List */
.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;
}
.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 Spinner */
.vi-sfr-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.vi-sfr-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Lite Card View Styles --- */
.vi-sfr-lite-card-container {
    max-width: 350px;
    margin: 15px auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    font-family: Arial, sans-serif;
    line-height: 1.4;
    background: #fff;
    text-align: left;
}
.vi-sfr-lite-card-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}
.vi-sfr-lite-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
}
.vi-sfr-lite-title a {
    text-decoration: none;
    color: #333;
}
.vi-sfr-lite-card-body {
    padding: 15px;
}
.vi-sfr-lite-progress-info {
    margin-bottom: 10px;
    font-size: 0.9em;
    font-weight: bold;
}
.vi-sfr-lite-raised, .vi-sfr-lite-raised-only {
    color: #5cb85c;
    font-size: 1.1em;
}
.vi-sfr-lite-goal-amount {
    color: #666;
    font-weight: normal;
    margin-left: 5px;
}
.vi-sfr-lite-goal-bar {
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}
.vi-sfr-lite-progress-bar {
    height: 100%;
    background-color: #5cb85c;
}
.vi-sfr-lite-excerpt {
    font-size: 0.85em;
    color: #444;
    margin-bottom: 10px;
}
.vi-sfr-lite-donor-count {
    font-size: 0.8em;
    color: #999;
}
.vi-sfr-lite-card-footer {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    text-align: center;
}
.vi-sfr-lite-link {
    display: block;
    padding: 8px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.2s;
}
.vi-sfr-lite-link:hover {
    background: #005177;
}