/* Donations Page - Full-Width, User-Friendly Design */

/* Main Container - Full Width */
.dp-donate-page-container {
    padding: 1rem 0;
    background: #f8f9fa;
    min-height: 70vh;
    width: 100%;
}

/* Progress Steps - Moved to Top */
.dp-progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 1rem;
}

.dp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.dp-step.active {
    opacity: 1;
}

.dp-step.completed {
    opacity: 0.8;
}

.dp-step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.dp-step.active .dp-step-number {
    background: #006905;
    color: white;
    transform: scale(1.1);
}

.dp-step.completed .dp-step-number {
    background: #28a745;
    color: white;
}

.dp-step-label {
    font-weight: 500;
    color: #495057;
    font-size: 0.85rem;
    text-align: center;
}

.dp-step.active .dp-step-label {
    color: #006905;
    font-weight: 600;
}

/* Form Wrapper - Full Width */
.dp-donation-form-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    width: 100%;
}

/* Form Steps */
.dp-form-step {
    display: none;
    padding: 2rem;
}

.dp-form-step.active {
    display: block;
    animation: dp-fadeInUp 0.5s ease-out;
}

@keyframes dp-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.step-header h3 {
    color: #006905;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.step-header p {
    color: #6c757d;
    margin: 0;
    font-size: 1rem;
}

/* Compact Project Grid - Full Width */
.project-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.project-card-compact {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: auto;
    min-height: 280px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.project-card-compact:hover {
    border-color: #006905;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 105, 5, 0.12);
}

.project-card-compact.selected {
    border-color: #006905;
    background: linear-gradient(135deg, #f8fff9 0%, #f0fff4 100%);
    box-shadow: 0 8px 25px rgba(0, 105, 5, 0.15);
    transform: translateY(-2px);
}

.project-image-compact {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.project-image-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card-compact:hover .project-image-compact img {
    transform: scale(1.05);
}

.emergency-badge-compact {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #dc3545;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.project-content-compact {
    padding: 1.25rem;
    height: auto;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-content-compact h4 {
    color: #2c3e50;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    line-height: 1.3;
}

.project-content-compact div {
    color: #6c757d;
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-meta-compact {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.5rem;
}

.country-compact {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid #90caf9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    display: inline-block;
    line-height: 1.2;
}

.select-project-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
}

.select-project-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.select-project-btn i {
    font-size: 0.8rem;
}

.select-indicator {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: #006905;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0.8);
}

.project-card-compact.selected .select-indicator {
    opacity: 1;
    transform: scale(1);
}

/* Add a subtle border glow for selected cards */
.project-card-compact.selected::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #006905, #00b590);
    border-radius: 18px;
    z-index: -1;
    opacity: 0.3;
}

.select-indicator i {
    font-size: 0.8rem;
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

.step-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
}

.step-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-next:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom styling for next buttons to match webapp theme */
.btn-next {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border-color: #28a745 !important;
    color: white !important;
    transition: all 0.3s ease;
}

.btn-next:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%) !important;
    border-color: #218838 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-next:focus {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Compact Form Elements */
/* Better spacing for Step 2 form elements */
.donation-details-form-compact {
    margin-top: 1rem; /* Add space after project info banner */
}

.form-group-compact {
    margin-bottom: 1.5rem; /* Increased spacing between form groups */
}

.form-group-compact:last-child {
    margin-bottom: 1rem; /* Reduced from 2rem to move buttons UP */
}

.form-group-compact label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control-compact {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-control-compact:focus {
    outline: none;
    border-color: #006905;
    box-shadow: 0 0 0 3px rgba(0, 105, 5, 0.1);
}

/* Compact Amount Section */
.donation-amount-section-compact {
    margin-bottom: 2rem;
}

.amount-options-compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quick-amounts-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.amount-btn-compact {
    background: white;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.amount-btn-compact:hover {
    border-color: #006905;
    color: #006905;
}

.amount-btn-compact.active {
    background: #006905;
    border-color: #006905;
    color: white;
}

.custom-amount-compact input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.custom-amount-compact input:focus {
    outline: none;
    border-color: #006905;
    box-shadow: 0 0 0 3px rgba(0, 105, 5, 0.1);
}

/* Compact Summary */
.donation-summary-compact {
    max-width: 600px;
    margin: 0 auto;
}

.summary-card-compact {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid #e9ecef;
}

.summary-card-compact h4 {
    color: #006905;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.2rem;
}

.summary-details-compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-item-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-item-compact:last-child {
    border-bottom: none;
}

.summary-item-compact .label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.summary-item-compact .value {
    color: #006905;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Compact Basket Sidebar */
.basket-sidebar-compact {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.basket-header-compact {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.basket-header-compact h4 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.basket-count-compact {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

.basket-content-compact {
    padding: 1.25rem;
    min-height: 300px;
}

.empty-basket-state-compact {
    text-align: center;
    padding: 2rem 1rem;
    color: #6c757d;
}

.empty-basket-state-compact i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-basket-state-compact p {
    margin: 0.5rem 0;
    font-weight: 500;
    font-size: 0.9rem;
}

.empty-basket-state-compact small {
    opacity: 0.7;
    font-size: 0.8rem;
}

.basket-footer-compact {
    padding: 1.25rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.basket-total-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1rem;
}

.total-amount-compact {
    color: #006905;
    font-size: 1.1rem;
}

/* Compact Basket Items */
.basket-item-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.basket-item-info-compact {
    flex: 1;
}

.basket-item-title-compact {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.basket-item-details-compact {
    font-size: 0.8rem;
    color: #6c757d;
}

.basket-item-amount-compact {
    font-weight: 600;
    color: #006905;
    font-size: 1rem;
    margin: 0 0.75rem;
}

.basket-item-remove-compact {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.4rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.basket-item-remove-compact:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .project-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    .progress-steps {
        gap: 1rem;
    }
    
    .step-label {
        font-size: 0.8rem;
    }
    
    .project-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .basket-sidebar-compact {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .progress-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .project-grid-compact {
        grid-template-columns: 1fr;
    }
    
    .step-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .step-actions .btn {
        width: 100%;
    }
    
    .quick-amounts-compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .donation-details-form-compact {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .donate-page-container {
        padding: 1rem 0;
    }
    
    .form-step {
        padding: 1rem;
    }
    
    .project-content-compact {
        padding: 0.75rem;
    }
    
    .step-header h3 {
        font-size: 1.2rem;
    }
    
    .project-grid-compact {
        gap: 1rem;
    }
}

/* Animation Classes */
[data-aos] {
    opacity: 0;
    transition: all 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Form Validation */
.was-validated .form-control-compact:invalid {
    border-color: #dc3545;
}

.was-validated .form-control-compact:valid {
    border-color: #28a745;
}

.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.was-validated .form-control-compact:invalid ~ .invalid-feedback {
    display: block;
}

/* Project Info Banner */
.project-info-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0 2rem 0; /* Increased bottom margin for better spacing */
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInDown 0.5s ease-out;
}

.project-info-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.project-info-left h4 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.project-info-left p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.95rem;
}

.project-info-right .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.project-info-right .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

/* Enhanced donation option buttons */
.amount-btn-compact {
    position: relative;
    overflow: hidden;
}

.amount-btn-compact .option-name {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    opacity: 0.8;
    line-height: 1.2;
}

/* Note field styling */
.note-field-compact {
    margin-top: 1.5rem;
}

.note-field-compact label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.note-field-compact textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.note-field-compact textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.note-field-compact textarea::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Quantity field styling */
.quantity-field-compact {
    margin-top: 1rem;
}

.quantity-field-compact label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.quantity-field-compact input {
    width: 120px;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
}

.quantity-field-compact input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quantity-field-compact input::-webkit-outer-spin-button,
.quantity-field-compact input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-field-compact input[type=number] {
    -moz-appearance: textfield;
}

/* Quantity Controller in Basket */
.quantity-controller-compact {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid #667eea;
}

.quantity-header h6 {
    margin: 0 0 0.75rem 0;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
}

.quantity-controls label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
}

.quantity-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

.quantity-btn:active {
    transform: scale(0.95);
}

#basketQuantityInput {
    width: 60px;
    height: 32px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.25rem;
}

#basketQuantityInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

#basketQuantityInput::-webkit-outer-spin-button,
#basketQuantityInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#basketQuantityInput[type=number] {
    -moz-appearance: textfield;
}

/* Basket Item Quantity Controls */
.basket-item-controls-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantity-controls-compact {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.25rem;
}

.quantity-btn-compact {
    width: 24px;
    height: 24px;
    border: none;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
    font-size: 0.8rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.quantity-btn-compact:hover {
    background: #e9ecef;
    color: #495057;
    transform: scale(1.05);
}

.quantity-btn-compact:active {
    transform: scale(0.95);
}

.quantity-display-compact {
    min-width: 20px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    padding: 0 0.25rem;
}

/* Responsive adjustments for basket items */
@media (max-width: 768px) {
    .basket-item-controls-compact {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end;
    }
    
    .quantity-controls-compact {
        order: 2;
    }
    
    .basket-item-remove-compact {
        order: 1;
    }
}

/* Animation for banner */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for banner */
@media (max-width: 768px) {
    .project-info-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .project-info-right .btn {
        width: 100%;
    }
}

/* Alert message improvements */
.alert {
    margin-bottom: 1rem; /* Consistent spacing between messages */
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}
