/* Gift Management Modern Responsive Styles */
.gift-management-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #f8fafb;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

#add-gift-container {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

#add-gift-container .row {
    margin: 0 -8px;
}

#add-gift-container .col-md-6 {
    padding: 0 8px;
}

#add-gift-container .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

#add-gift-container .form-control:focus {
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    outline: none;
}

#add-gift-button {
    background: linear-gradient(135deg, #4285f4 0%, #0f62fe 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

#add-gift-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.4);
}

/* Admin Gift Cards Layout - Single Column for All Devices */
.admin-gift-cards {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

/* Admin Gift Card Styles */
.admin-gift-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.admin-gift-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-color: #4285f4;
}

/* Admin Card Header */
.admin-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #e9ecef;
}

.admin-card-title-section {
    flex: 1;
}

.admin-card-title {
    font-weight: 700;
    font-size: 18px;
    color: #212529;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.admin-card-id {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-card-status-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.gift-type-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.gift-type-badge.group {
    background: linear-gradient(135deg, #4285f4 0%, #0f62fe 100%);
    color: white;
}

.gift-type-badge.individual {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.custom-gift-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    margin-bottom: 4px;
}

.status-indicator {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admin Card Content */
.admin-card-content {
    padding: 24px;
}

.admin-info-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-info-item {
    position: relative;
}

.admin-info-item label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-info-value {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.product-link {
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.product-link:hover {
    color: #0f62fe;
    text-decoration: underline;
}

.quick-edit-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-edit-btn:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.no-data {
    color: #adb5bd;
    font-style: italic;
    font-size: 13px;
}

/* Funding Progress */
.funding-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex: 1;
}

.amount-text {
    font-weight: 600;
    color: #212529;
}

.percentage-text {
    font-weight: 600;
    color: #4285f4;
    font-size: 13px;
}

.funding-progress-bar {
    height: 8px;
    background: #f1f3f4;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    flex: 1;
    margin-right: 12px;
}

.funding-fill {
    height: 100%;
    background: linear-gradient(90deg, #4285f4, #0f62fe);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Contributors */
.contributors-section .admin-info-value {
    flex-direction: column;
    align-items: stretch;
}

.contributors-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.contributor-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.contributor-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contributor-name {
    font-weight: 500;
    font-size: 13px;
    color: #495057;
}

.coordinator-badge {
    background: #4285f4;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contributor-amount {
    color: #28a745;
    font-weight: 600;
    font-size: 13px;
}

.remaining-amount {
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.fully-funded {
    color: #28a745;
    background: #d4edda;
}

.need-amount {
    color: #fd7e14;
    background: #fff3cd;
}

.reserved-text {
    color: #fd7e14;
    font-weight: 600;
}

.available-text {
    color: #28a745;
    font-weight: 500;
}

.gift-progress {
    background: #f1f3f4;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin: 8px 0;
}

.gift-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #34a853, #0f9d58);
    transition: width 0.3s ease;
    border-radius: 8px;
}

/* Admin Card Actions */
.admin-card-actions {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.admin-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.admin-btn.primary {
    background: linear-gradient(135deg, #4285f4 0%, #0f62fe 100%);
    color: white;
}

.admin-btn.primary:hover {
    background: linear-gradient(135deg, #0f62fe 0%, #1a73e8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.admin-btn.secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.admin-btn.secondary:hover {
    background: #e9ecef;
    color: #212529;
    transform: translateY(-1px);
}

.admin-btn.danger {
    background: #dc3545;
    color: white;
}

.admin-btn.danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Custom Gift Details */
.custom-submission-info {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 16px;
}

.custom-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.detail-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

/* Buttons */
.gift-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #e3f2fd;
    color: #1976d2;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.gift-link:hover {
    background: #bbdefb;
    color: #1565c0;
    text-decoration: none;
    transform: translateY(-1px);
}

.edit-btn, .remove-btn {
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.edit-btn {
    background: #e8f5e8;
    color: #2e7d32;
}

.edit-btn:hover {
    background: #c8e6c9;
    transform: translateY(-1px);
}

.remove-btn {
    background: #ffebee;
    color: #d32f2f;
}

.remove-btn:hover {
    background: #ffcdd2;
    transform: translateY(-1px);
}

/* Status badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-available {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-reserved {
    background: #fff3e0;
    color: #f57c00;
}

.status-funded {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-progress {
    background: #e3f2fd;
    color: #1976d2;
}

/* Contributors section */
.contributors-list {
    max-height: 80px;
    overflow-y: auto;
    margin-top: 8px;
}

.contributor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
    color: #666;
}

.contributor-badge {
    background: #4285f4;
    color: white;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    margin-left: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .gift-management-container {
        padding: 16px;
        margin: 0 -15px;
        border-radius: 0;
    }

    #add-gift-container {
        padding: 20px;
        margin: 0 0 20px 0;
    }

    #add-gift-container .row {
        margin: 0;
    }

    #add-gift-container .col-md-6 {
        padding: 0;
        margin-bottom: 12px;
    }

    #add-gift-button {
        width: 100%;
        margin-top: 8px;
    }

    .admin-gift-cards {
        gap: 20px;
        grid-template-columns: 1fr;
    }

    .admin-card-header {
        padding: 16px 20px;
        flex-direction: column;
        gap: 12px;
    }

    .admin-card-status-section {
        flex-direction: row;
        align-items: center;
        align-self: stretch;
        justify-content: space-between;
    }

    .admin-card-content {
        padding: 20px;
    }

    .admin-info-grid {
        gap: 16px;
    }

    .admin-card-actions {
        flex-direction: column;
        gap: 8px;
        padding: 16px 20px;
    }

    .admin-btn {
        padding: 12px 16px;
    }

    /* Mobile fixes for funding display */
    .funding-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
    }

    .amount-text {
        white-space: nowrap;
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .percentage-text {
        font-size: 12px;
    }

    /* Force vertical stacking for funding section on mobile */
    .admin-info-value {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .funding-progress-bar {
        margin-right: 0 !important;
        width: 100% !important;
        height: 12px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        flex: none !important;
        display: block !important;
    }

    .quick-edit-btn {
        align-self: flex-start !important;
        margin-top: 0 !important;
    }

    .gift-card-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .edit-btn, .remove-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .gift-card {
        padding: 16px;
    }

    .gift-card-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .gift-card-value {
        text-align: left;
    }
}

/* Loading and empty states */
.gift-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

.gift-empty {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-top: 24px;
}

.gift-empty h3 {
    color: #6c757d;
    margin-bottom: 8px;
    font-size: 18px;
}

.gift-empty p {
    color: #adb5bd;
    margin: 0;
    font-size: 14px;
}
