/* WP Rise Donation Form Specific Styles */

:root {
    --wp-rise-form-primary: #4f46e5;
    --wp-rise-form-primary-hover: #4338ca;
    --wp-rise-form-bg: #ffffff;
    --wp-rise-form-text: #0f172a;
    --wp-rise-form-text-light: #64748b;
    --wp-rise-form-border: #e2e8f0;
    --wp-rise-form-radius: 16px;
    --wp-rise-form-radius-sm: 8px;
    --wp-rise-form-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.wp-rise-form-container,
.wp-rise-donation-container {
    max-width: 650px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: var(--wp-rise-card-bg);
    border-radius: var(--wp-rise-radius);
    box-shadow: var(--wp-rise-shadow);
    border: 1px solid var(--wp-rise-border);
    font-family: inherit;
}

/* Tabs Styling */
.wp-rise-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 2rem;
    background: #f1f5f9;
    padding: 6px;
    border-radius: var(--wp-rise-form-radius-sm);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.wp-rise-tabs::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}

.wp-rise-tab-btn {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--wp-rise-form-text-light);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: calc(var(--wp-rise-form-radius-sm) - 2px);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wp-rise-tab-btn.active {
    background: #ffffff;
    color: var(--wp-rise-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Money Tab Amount Buttons */
.wp-rise-amount-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 1.5rem;
}

.wp-rise-amount-btn {
    padding: 14px;
    border: 2px solid var(--wp-rise-form-border);
    background: #ffffff;
    border-radius: var(--wp-rise-form-radius-sm);
    color: var(--wp-rise-form-text);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.wp-rise-amount-btn:hover {
    border-color: var(--wp-rise-primary);
    background: #f5f3ff;
    color: var(--wp-rise-primary);
}

.wp-rise-amount-btn.active {
    border-color: var(--wp-rise-primary);
    background: var(--wp-rise-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

/* Custom Amount Wrapper */
.wp-rise-custom-amount-wrapper {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: var(--wp-rise-form-radius-sm);
    border: 1px solid var(--wp-rise-form-border);
}

.wp-rise-currency-symbol {
    font-weight: 800;
    color: var(--wp-rise-form-text-light);
    font-size: 1.1rem;
}

/* Book Donation Styling */
.wp-rise-book-item {
    background: #ffffff;
    border: 1px solid var(--wp-rise-form-border);
    border-radius: var(--wp-rise-form-radius-sm);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    position: relative;
    transition: box-shadow 0.3s ease;
}

.wp-rise-book-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.wp-rise-remove-book {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fee2e2;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
}

.wp-rise-remove-book:hover {
    background: #fecaca;
    transform: scale(1.1);
}

/* Shared inventory/book item card styling */
.wp-rise-inventory-item,
.wp-rise-book-item.wp-rise-inventory-item {
    position: relative;
    border: 1px solid var(--wp-rise-border);
    border-radius: var(--wp-rise-radius-md);
    background: #fff;
    box-shadow: var(--wp-rise-shadow-sm);
    margin-bottom: 24px;
    padding: 24px;
}

.wp-rise-remove-inventory,
.wp-rise-remove-book {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fee2e2;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
}

.wp-rise-remove-inventory:hover,
.wp-rise-remove-book:hover {
    background: #fecaca;
    transform: scale(1.1);
}

/* Force donation form book items to ignore bookstore card styles */
.wp-rise-books-donation-wrapper .wp-rise-book-item,
.wp-rise-books-donation-wrapper .wp-rise-book-item.wp-rise-inventory-item,
.wp-rise-tab-content .wp-rise-books-donation-wrapper .wp-rise-book-item,
.wp-rise-tab-content .wp-rise-books-donation-wrapper .wp-rise-book-item.wp-rise-inventory-item {
    display: block !important;
    width: 100% !important;
    min-height: auto !important;
    align-items: initial !important;
    background: #fff !important;
    border: 1px solid var(--wp-rise-border) !important;
    box-shadow: var(--wp-rise-shadow-sm) !important;
    padding: 24px !important;
    margin-bottom: 24px !important;
}

.wp-rise-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .wp-rise-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Groups & Inputs */
.wp-rise-form-group {
    margin-bottom: 1.5rem;
}

.wp-rise-form-label {
    display: block;
    font-weight: 700;
    color: var(--wp-rise-form-text);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.wp-rise-form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--wp-rise-form-border);
    border-radius: var(--wp-rise-form-radius-sm);
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #ffffff;
    color: var(--wp-rise-form-text);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.wp-rise-form-input:focus {
    border-color: var(--wp-rise-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

textarea.wp-rise-form-input {
    height: auto;
    padding: 12px 16px;
    min-height: 100px;
}

/* Quantity Controls */
.wp-rise-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wp-rise-qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--wp-rise-form-border);
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--wp-rise-form-text);
    transition: all 0.2s;
}

.wp-rise-qty-btn:hover {
    border-color: var(--wp-rise-form-primary);
    color: var(--wp-rise-form-primary);
    background: #f5f3ff;
}

/* Footer Section */
.wp-rise-form-footer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--wp-rise-form-border);
}

.wp-rise-submit-btn {
    width: 100%;
    height: 56px;
    background: var(--wp-rise-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--wp-rise-radius-sm);
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.wp-rise-submit-btn:hover {
    background: var(--wp-rise-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--wp-rise-shadow-lg);
}

.wp-rise-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Product Selection Feedback */
.wp-rise-product-card.selected {
    border-color: var(--wp-rise-form-primary) !important;
    background: #f5f3ff !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1) !important;
}

.wp-rise-product-card.selected .wp-rise-add-product-btn {
    background: var(--wp-rise-form-primary) !important;
    color: #fff !important;
}

/* Compact Product Sponsorship Layout */
.wp-rise-compact-product-layout {
    padding: 0 !important;
    overflow: hidden;
    background: #fff;
}

.wp-rise-compact-product-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    padding: 1.75rem;
}

.wp-rise-compact-product-image {
    width: 200px;
    height: 200px;
}

.wp-rise-compact-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--wp-rise-form-border);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}

.wp-rise-compact-product-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .wp-rise-compact-product-grid {
        grid-template-columns: 1fr;
        padding: 1.25rem;
        gap: 20px;
    }

    .wp-rise-compact-product-image {
        width: 100%;
        height: 220px;
    }
}