/**
 * OrgReach Budget & Donations Frontend CSS
 */

/* Budget Summary */
.orgreach-budget-summary {
    width: 100%;
}

.orgreach-budget-cards {
    display: grid;
    width: 100%;
}

.budget-card {
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.budget-card:hover {
    transform: translateY(-5px);
}

.orgreach-budget-error {
    padding: 20px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    text-align: center;
}

/* Donation Form */
.orgreach-donation-form {
    width: 100%;
}

.donation-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.donation-amount-btn {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
}

.donation-amount-btn:hover {
    border-color: #823dd8;
    color: #823dd8;
}

.donation-amount-btn.active {
    background: #823dd8;
    color: #fff;
    border-color: #823dd8;
}

.donation-custom-amount {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    margin-top: 10px;
}

.donation-form-fields {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #823dd8;
    box-shadow: 0 0 0 3px rgba(130, 61, 216, 0.1);
}

.donation-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.donation-option {
    display: flex;
    align-items: center;
}

.donation-option input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
}

#card-element {
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

#card-errors {
    color: #dc2626;
    margin-top: 10px;
    font-size: 14px;
}

.donation-submit-btn {
    width: 100%;
    padding: 16px;
    background: #823dd8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 20px;
}

.donation-submit-btn:hover {
    background: #6f2bb0;
}

.donation-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Progress Bar */
.orgreach-donation-progress {
    width: 100%;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e5e7eb;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: #823dd8;
    transition: width 1s ease;
    position: relative;
}

.progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: #374151;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

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

.progress-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #823dd8;
}

.progress-stat-label {
    font-size: 14px;
    color: #6b7280;
}

/* Cost Breakdown */
.orgreach-cost-breakdown {
    width: 100%;
}

.cost-breakdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cost-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.cost-breakdown-item:last-child {
    border-bottom: none;
}

.cost-category {
    font-weight: 600;
    color: #374151;
}

.cost-amount {
    font-weight: 700;
    color: #823dd8;
}

/* Capacity Metrics */
.orgreach-capacity-metrics {
    width: 100%;
}

.capacity-metric {
    margin-bottom: 25px;
}

.capacity-metric:last-child {
    margin-bottom: 0;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.metric-label {
    font-weight: 600;
    color: #374151;
}

.metric-value {
    font-weight: 700;
    color: #823dd8;
}

.metric-progress {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
}

.metric-progress-fill {
    height: 100%;
    background: #823dd8;
    transition: width 1s ease;
}

/* Donation Goals */
.orgreach-donation-goals {
    width: 100%;
}

.donation-goals-grid {
    display: grid;
    gap: 20px;
}

.goal-card {
    background: #f9fafb;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
}

.goal-period {
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.goal-amount {
    font-size: 32px;
    font-weight: 700;
    color: #823dd8;
    margin-bottom: 8px;
    line-height: 1.2;
}

.goal-target {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 6px;
    line-height: 1.3;
}

/* Donor Dashboard */
.orgreach-donor-dashboard {
    width: 100%;
}

.donor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.donor-stat-card {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.donor-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #823dd8;
    margin-bottom: 5px;
}

.donor-stat-label {
    font-size: 14px;
    color: #6b7280;
}

.donation-history {
    margin-top: 30px;
}

.donation-history-table {
    width: 100%;
    border-collapse: collapse;
}

.donation-history-table th,
.donation-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.donation-history-table th {
    font-weight: 700;
    color: #374151;
    background: #f9fafb;
}

.donation-history-table td {
    color: #6b7280;
}

.receipt-link {
    color: #823dd8;
    text-decoration: none;
    font-weight: 600;
}

.receipt-link:hover {
    text-decoration: underline;
}

/* Additional Widget Styles */
.donation-goals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.donation-goals-stacked .goal-card {
    margin-bottom: 20px;
}

.goal-card {
    text-align: center;
}

.goal-target {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 6px;
    line-height: 1.3;
}

.goal-percentage {
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
    line-height: 1.4;
}

.metric-description {
    font-size: 14px;
    color: #6b7280;
    margin-top: 10px;
}

.cost-percentage {
    font-size: 14px;
    color: #6b7280;
}

.cost-breakdown-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e5e7eb;
}

.cost-breakdown-subtotal {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.cost-breakdown-carryover {
    background-color: #f9fafb;
    padding: 15px 0;
    margin: 10px 0;
    border-left: 3px solid #823dd8;
    padding-left: 12px;
}

.cost-breakdown-carryover .cost-category {
    font-style: italic;
}

.carryover-description {
    font-size: 12px;
    color: #6b7280;
    font-style: normal;
}

.carryover-deficit {
    color: #dc2626;
    font-weight: 700;
}

.carryover-surplus {
    color: #059669;
    font-weight: 700;
}

.donor-badge {
    text-align: center;
    margin-bottom: 30px;
}

.donor-badge img {
    width: 120px;
    height: auto;
    margin-bottom: 10px;
}

.login-message {
    text-align: center;
    padding: 40px 20px;
}

.login-message p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #6b7280;
}

/* Funding Status Widget */
.orgreach-funding-status {
    width: 100%;
}

.funding-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.funding-section:last-child {
    margin-bottom: 0;
}

.section-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
}

.funding-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.funding-metric:last-child {
    border-bottom: none;
}

.metric-label {
    font-weight: 600;
    color: #6b7280;
}

.metric-value {
    font-weight: 700;
    color: #823dd8;
    font-size: 18px;
}

.shortfall-amount {
    color: #dc2626 !important;
}

.funding-progress-container {
    margin-top: 20px;
}

.funding-progress {
    width: 100%;
    height: 20px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.funding-progress-fill {
    height: 100%;
    background: #823dd8;
    transition: width 1s ease;
}

.progress-label {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #374151;
}

/* Responsive */
@media (max-width: 768px) {
    .donation-amounts {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .progress-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .donor-stats {
        grid-template-columns: 1fr;
    }
    
    .donation-goals-grid {
        grid-template-columns: 1fr;
    }
    
    .funding-section {
        padding: 15px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .metric-value {
        font-size: 16px;
    }
}