/* Free Digital Downloads — Frontend Styles */

/* Buttons */
.fdd-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #111;
    color: #fff;
    text-decoration: none;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s, transform 0.1s;
}
.fdd-btn:hover { background: #222; }
.fdd-btn:active { transform: scale(0.98); }
.fdd-btn-primary { background: #2563eb; border-color: #2563eb; }
.fdd-btn-primary:hover { background: #1d4ed8; }
.fdd-btn-full { width: 100%; text-align: center; }
.fdd-btn-sm { padding: 0.25rem 0.75rem; font-size: 0.75rem; }

.fdd-add-to-cart {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}
.fdd-add-to-cart:hover { background: #1d4ed8; }
.fdd-add-to-cart:disabled { opacity: 0.6; cursor: not-allowed; }

/* Product Details (single product page) */
.fdd-product-details {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #eee;
}
.fdd-product-pricing {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}
.fdd-price-original {
    color: #999;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}
.fdd-price-current {
    color: #111;
    font-weight: 700;
}
.fdd-price-free {
    color: #16a34a;
    font-weight: 700;
    font-size: 1.25rem;
}
.fdd-licensing-note {
    margin-top: 0.75rem;
    color: #666;
    font-size: 0.875rem;
}
.fdd-file-list {
    margin-top: 1.5rem;
}
.fdd-file-list h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.fdd-file-list ul {
    list-style: disc;
    padding-left: 1.25rem;
}
.fdd-file-list li {
    padding: 0.25rem 0;
    font-size: 0.875rem;
    color: #555;
}

/* Cart */
.fdd-cart-table {
    width: 100%;
    border-collapse: collapse;
}
.fdd-cart-table th,
.fdd-cart-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.fdd-cart-table tfoot td {
    font-weight: bold;
    border-top: 2px solid #111;
}
.fdd-remove-from-cart {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
}
.fdd-remove-from-cart:hover { color: #dc2626; }
.fdd-cart-empty { color: #666; padding: 2rem 0; }
.fdd-cart-actions { margin-top: 1.5rem; }

/* Checkout */
.fdd-checkout { max-width: 640px; }
.fdd-checkout-summary {
    background: #f9f9f9;
    color: #111;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #eee;
    border-radius: 6px;
}
.fdd-checkout-summary h3,
.fdd-checkout-summary span,
.fdd-checkout-summary strong,
.fdd-checkout-summary div {
    color: #111;
}
.fdd-checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: #111;
}
.fdd-checkout-total {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-top: 2px solid #111;
    margin-top: 0.5rem;
    font-weight: 700;
    color: #111;
}
.fdd-field { margin-bottom: 1rem; }
.fdd-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}
.fdd-field input,
.fdd-field select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
}
.fdd-field input:focus,
.fdd-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Stripe Card Element */
#fdd-card-element {
    padding: 0.65rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 0.5rem;
}
#fdd-card-errors {
    color: #dc3545;
    font-size: 0.8rem;
    min-height: 1.2em;
    margin-bottom: 1rem;
}

/* Discount */
.fdd-discount-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.fdd-discount-row input { flex: 1; }
.fdd-discount-success { color: #16a34a; font-size: 0.8rem; margin-top: 0.25rem; }
.fdd-discount-error { color: #dc3545; font-size: 0.8rem; margin-top: 0.25rem; }

/* Receipt */
.fdd-receipt { max-width: 640px; }
.fdd-receipt-item {
    background: #f9f9f9;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #eee;
    border-radius: 6px;
}
.fdd-receipt-license {
    background: #f0fdf4;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
}
.fdd-receipt-license code {
    font-weight: bold;
    user-select: all;
    background: #ecfdf5;
    padding: 0.15rem 0.35rem;
    border-radius: 2px;
}

/* Account / Downloads */
.fdd-account-order {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}
.fdd-account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

/* Reviews / Ratings */
.fdd-review-rating { margin-bottom: 0.25rem; }
.fdd-verified-badge {
    display: inline-block;
    background: #f0fdf4;
    color: #16a34a;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.fdd-star { color: #f59e0b; }
.fdd-star-empty { color: #ddd; }
