/**
 * Fundraiser Plugin Styles
 * Matches Astra Child theme and WooCommerce patterns
 */

/* ============================================
   Container Fluid (Consistent Width)
   ============================================ */

.ssb-container-fluid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2em 1em;
    width: 100%;
}

@media (max-width: 768px) {
    .ssb-container-fluid {
        padding: 1.5em 1em;
    }
}

/* ============================================
   Form Styles (WooCommerce Pattern)
   ============================================ */

.ssb-fundraiser-form-container,
.ssb-fundraiser-form,
.ssb-nonprofit-form,
.ssb-participant-form {
    max-width: 600px;
    margin: 0 auto;
}

.ssb-fundraiser-form-row,
.ssb-form-row {
    margin-bottom: 1.5em;
}

.ssb-fundraiser-form-row label,
.ssb-form-row label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.ssb-fundraiser-form-row .required,
.ssb-form-row .required {
    color: #e2401c;
}

.ssb-fundraiser-form-row input[type="text"],
.ssb-fundraiser-form-row input[type="email"],
.ssb-fundraiser-form-row input[type="tel"],
.ssb-fundraiser-form-row input[type="number"],
.ssb-fundraiser-form-row input[type="date"],
.ssb-fundraiser-form-row input[type="password"],
.ssb-fundraiser-form-row textarea,
.ssb-fundraiser-form-row select,
.ssb-form-row input[type="text"],
.ssb-form-row input[type="email"],
.ssb-form-row input[type="tel"],
.ssb-form-row input[type="number"],
.ssb-form-row input[type="date"],
.ssb-form-row input[type="password"],
.ssb-form-row textarea,
.ssb-form-row select,
.input-text {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    line-height: 1.5;
    transition: border-color 0.3s ease;
}

.ssb-fundraiser-form-row input:focus,
.ssb-fundraiser-form-row textarea:focus,
.ssb-fundraiser-form-row select:focus,
.ssb-form-row input:focus,
.ssb-form-row textarea:focus,
.ssb-form-row select:focus,
.input-text:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.ssb-fundraiser-form-row .description,
.ssb-form-row .description {
    display: block;
    margin-top: 0.5em;
    font-size: 0.875em;
    color: #666;
    font-style: italic;
}

.ssb-fundraiser-form-row small,
.ssb-form-row small {
    display: block;
    margin-top: 0.5em;
    font-size: 0.875em;
    color: #666;
}

/* ============================================
Button Styles (WooCommerce Pattern)
============================================ */

.ssb-button,
.ssb-fundraiser-form .button,
.ssb-nonprofit-form .button,
.ssb-participant-form .button {
    display: inline-block;
    padding: 0.5em 1em;
    background-color: #9f76be;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.875em;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.ssb-button:hover,
.ssb-fundraiser-form .button:hover,
.ssb-nonprofit-form .button:hover,
.ssb-participant-form .button:hover {
    background-color: #8b6ba8;
    color: #fff;
    text-decoration: none !important;
}

.ssb-button:active,
.ssb-fundraiser-form .button:active,
.ssb-nonprofit-form .button:active,
.ssb-participant-form .button:active {
    transform: translateY(1px);
}

.ssb-button-primary {
    background-color: #9f76be;
}

.ssb-button-primary:hover {
    background-color: #8b6ba8;
}

.ssb-button-large {
    padding: 0.75em 1.5em;
    font-size: 1em;
}

.ssb-button-secondary {
    background-color: #9f76be;
}

.ssb-button-secondary:hover {
    background-color: #8b6ba8;
}

/* ============================================
   Message Styles
   ============================================ */

.ssb-message,
.ssb-fundraiser-message {
    padding: 1em 1.5em;
    margin-bottom: 1.5em !important;
    border-left: 4px solid;
    border-radius: 4px;
    background-color: #fff;
}

.ssb-message.success,
.ssb-fundraiser-message.success {
    border-left-color: #46b450;
    background-color: #f0f6f0;
    color: #1e4620;
}

.ssb-message.error,
.ssb-fundraiser-message.error {
    border-left-color: #dc3232;
    background-color: #fef7f7;
    color: #8a2424;
}

.ssb-message.info,
.ssb-fundraiser-message.info {
    border-left-color: #2271b1;
    background-color: #f0f6fc;
    color: #0a4b78;
}

/* ============================================
   Table Styles (Dashboard)
   ============================================ */

.ssb-fundraiser-table,
.ssb-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ssb-fundraiser-table thead,
.ssb-dashboard-table thead {
    background-color: #f7f7f7;
}

.ssb-fundraiser-table th,
.ssb-fundraiser-table td,
.ssb-dashboard-table th,
.ssb-dashboard-table td {
    padding: 1em;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.ssb-fundraiser-table th,
.ssb-dashboard-table th {
    font-weight: 600;
    color: #1d2327;
}

.ssb-fundraiser-table tbody tr:hover,
.ssb-dashboard-table tbody tr:hover {
    background-color: #f9f9f9;
}

.ssb-fundraiser-table tbody tr:last-child td,
.ssb-dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

.ssb-fundraiser-table a,
.ssb-dashboard-table a {
    color: #2271b1;
    text-decoration: none;
}

.ssb-fundraiser-table a:hover,
.ssb-dashboard-table a:hover {
    text-decoration: underline;
}

/* ============================================
   Dashboard Styles
   ============================================ */

.ssb-page-header {
    margin-bottom: 2em;
}

.ssb-page-header-breadcrumb {
    margin-bottom: 0.75em;
    font-size: 0.875em;
}

.ssb-page-header-breadcrumb,
.ssb-page-header-breadcrumb::before,
.ssb-page-header-breadcrumb::after {
    content: "";
    display: block;
    clear: both;
}

.ssb-page-header-breadcrumb a {
    color: #666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    transition: color 0.2s ease;
}

.ssb-page-header-breadcrumb a:hover {
    color: #9f76be;
    text-decoration: underline;
}

/* Buttons in breadcrumb area (for primary actions) */
.ssb-page-header-breadcrumb .ssb-button {
    color: #fff;
    text-decoration: none;
    font-size: 0.875em;
    padding: 0.5em 1em;
}

.ssb-page-header-breadcrumb .ssb-button:hover {
    color: #fff;
    text-decoration: none;
}

.ssb-page-header h2,
.ssb-page-header h3 {
    margin: 0;
    font-size: 1.75em;
    line-height: 1.3;
}

/* Legacy support for dashboard-header class */
.ssb-dashboard-header {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 2px solid #ddd;
}

.ssb-dashboard-header h2,
.ssb-dashboard-header h3 {
    margin: 0;
    font-size: 1.75em;
}

.ssb-dashboard-empty {
    padding: 2em;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 4px;
    color: #666;
}

.ssb-my-fundraisers-dashboard {
    margin: 2em 0;
}

/* ============================================
   Fundraiser List/Cards
   ============================================ */

.ssb-fundraiser-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2em;
    margin: 2em 0;
}

.ssb-fundraiser-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5em;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.ssb-fundraiser-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.ssb-fundraiser-item h3 {
    margin-top: 0;
    margin-bottom: 0.75em;
}

.ssb-fundraiser-item h3 a {
    color: #1d2327;
    text-decoration: none;
}

.ssb-fundraiser-item h3 a:hover {
    color: #2271b1;
}

.ssb-fundraiser-excerpt {
    color: #666;
    margin-bottom: 1em;
    line-height: 1.6;
}

/* Progress Bar */
.ssb-fundraiser-progress {
    margin: 1.5em 0;
}

.ssb-progress-bar {
    width: 100%;
    height: 24px;
    background-color: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5em;
}

.ssb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #46b450, #5cb85c);
    transition: width 0.5s ease;
    border-radius: 12px;
}

.ssb-progress-text {
    font-size: 0.875em;
    color: #666;
    text-align: center;
}

.ssb-progress-text strong {
    color: #1d2327;
    font-size: 1.125em;
}

/* ============================================
   Single Fundraiser Page
   ============================================ */

.ssb-fundraiser-single {
    margin: 0;
    padding: 0;
}

.ssb-fundraiser-header {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 2px solid #ddd;
}

.ssb-fundraiser-header h1 {
    margin: 0 0 0.5em 0;
    font-size: 2.25em;
}

.ssb-fundraiser-status {
    display: inline-block;
    padding: 0.5em 1em;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875em;
    text-transform: uppercase;
}

.ssb-fundraiser-status.ended {
    background-color: #dc3232;
    color: #fff;
}

.ssb-fundraiser-status.active {
    background-color: #46b450;
    color: #fff;
}

.ssb-fundraiser-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3em;
    margin-top: 2em;
}

.ssb-fundraiser-main {
    line-height: 1.8;
}

.ssb-fundraiser-sidebar {
    position: sticky;
    top: 2em;
    height: fit-content;
}

.ssb-fundraiser-stats {
    background-color: #f9f9f9;
    padding: 1.5em;
    border-radius: 8px;
    margin-bottom: 1.5em;
}

.ssb-stat-item {
    margin-bottom: 1.5em;
}

.ssb-stat-item:last-child {
    margin-bottom: 0;
}

.ssb-stat-label {
    font-size: 0.875em;
    color: #666;
    margin-bottom: 0.5em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ssb-stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #46b450;
}

.ssb-fundraiser-donate {
    margin-bottom: 1.5em;
}

.ssb-fundraiser-donate .button,
.ssb-fundraiser-donate .ssb-button {
    width: 100%;
    text-align: center;
    display: block;
}

.ssb-fundraiser-share {
    padding: 1.5em;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.ssb-fundraiser-share h3 {
    margin-top: 0;
    margin-bottom: 1em;
    font-size: 1.125em;
}

.ssb-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

.ssb-share-button {
    padding: 0.75em 1em;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #1d2327;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    background: none;
    cursor: pointer;
    font-size: 1em;
}

.ssb-share-button:hover {
    background-color: #f7f7f7;
    border-color: #2271b1;
    color: #2271b1;
    text-decoration: none;
}

.ssb-share-button.facebook:hover {
    background-color: #1877f2;
    border-color: #1877f2;
    color: #fff;
}

.ssb-share-button.twitter:hover {
    background-color: #1da1f2;
    border-color: #1da1f2;
    color: #fff;
}

/* ============================================
   Fundraiser Selector (WooCommerce)
   ============================================ */

.ssb-fundraiser-selector {
    margin: 2em 0;
    padding: 1.5em;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.ssb-fundraiser-selector label {
    display: block;
    margin-bottom: 0.75em;
    font-weight: 600;
}

.ssb-fundraiser-selector select {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.ssb-fundraiser-selector .description {
    margin-top: 0.75em;
    font-size: 0.875em;
    color: #666;
}

/* ============================================
   Invitation Notice
   ============================================ */

.ssb-invitation-notice {
    background: #e7f5e7;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* ============================================
   Invited Participants Table
   ============================================ */

.invited-participants-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5em;
}

.invited-participants-table thead {
    background-color: #f5f5f5;
}

.invited-participants-table th,
.invited-participants-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.invited-participants-table th {
    font-weight: 600;
}

.invited-participants-table .status-accepted {
    color: #46b450;
}

.invited-participants-table .status-pending {
    color: #dc3232;
}

/* ============================================
   Bank Account Status Styles
   ============================================ */

.ssb-bank-account-status {
    margin: 20px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 5px;
}

.ssb-bank-account-status h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.status-success {
    color: #46b450;
    font-weight: bold;
}

.status-error {
    color: #dc3232;
    font-weight: bold;
}

.status-warning {
    color: #f0b849;
    font-weight: bold;
}

.status-info {
    color: #2271b1;
    font-weight: bold;
}

/* ============================================
   Participant Dashboard
   ============================================ */

.ssb-participant-dashboard {
    margin: 2em 0;
}

.ssb-participant-dashboard h2 {
    margin-bottom: 1em;
}

/* ============================================
   Utility Classes
   ============================================ */

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .ssb-fundraiser-content {
        grid-template-columns: 1fr;
    }
    
    .ssb-fundraiser-sidebar {
        position: static;
    }
    
    .ssb-page-header h2,
    .ssb-page-header h3 {
        font-size: 1.5em;
    }
    
    .ssb-page-header-breadcrumb {
        font-size: 0.8125em;
    }
    
    .ssb-fundraiser-list {
        grid-template-columns: 1fr;
    }
    
    .ssb-fundraiser-table,
    .ssb-dashboard-table {
        font-size: 0.875em;
    }
    
    .ssb-fundraiser-table th,
    .ssb-fundraiser-table td,
    .ssb-dashboard-table th,
    .ssb-dashboard-table td {
        padding: 0.75em 0.5em;
    }
}

/* ============================================
   Checkbox & Radio Styles
   ============================================ */

.ssb-fundraiser-form-row input[type="checkbox"],
.ssb-fundraiser-form-row input[type="radio"],
.ssb-form-row input[type="checkbox"],
.ssb-form-row input[type="radio"] {
    width: auto;
    margin-right: 0.5em;
}

.ssb-fundraiser-form-row label input[type="checkbox"],
.ssb-fundraiser-form-row label input[type="radio"],
.ssb-form-row label input[type="checkbox"],
.ssb-form-row label input[type="radio"] {
    margin-right: 0.5em;
}


/* ============================================
   Float Styles
   ============================================ */

.ssb-float-right {
    float: right;
}


/* ============================================
   Page Title Banner Styles
   ============================================ */

.ssb-page-title-banner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssb-page-title-banner-no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 100%;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssb-page-title-banner .ssb-page-title-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.ssb-page-title-banner .ssb-page-title-banner-text {
    position: relative;
    z-index: 2;
    color: #ffffff;
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    margin: 0;
    padding: 60px 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}