/**
 * Product Action Buttons Styles
 * Wishlist & Price Alert buttons for products
 * 
 * File: /wp-content/themes/picks-curated-theme/css/product-actions.css
 */

/* Container */
.pc-product-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Action Buttons */
.pc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pc-action-btn:hover {
    border-color: #d1d5db;
    color: #374151;
    background: #f9fafb;
}

.pc-action-btn svg {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

/* Icon-only buttons (for cards) */
.pc-action-btn.icon-only {
    padding: 0.625rem;
}

.pc-action-btn.icon-only .btn-text {
    display: none;
}

/* Wishlist Button */
.pc-wishlist-btn:hover {
    border-color: #fca5a5;
    color: #dc2626;
}

.pc-wishlist-btn.active {
    border-color: #dc2626;
    background: #fef2f2;
    color: #dc2626;
}

.pc-wishlist-btn.active svg {
    fill: currentColor;
}

.pc-wishlist-btn.active:hover {
    background: #fee2e2;
}

/* Price Alert Button */
.pc-alert-btn:hover {
    border-color: #93c5fd;
    color: #2563eb;
}

.pc-alert-btn.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.pc-alert-btn.active svg {
    fill: currentColor;
}

.pc-alert-btn.active:hover {
    background: #dbeafe;
}

/* Alert Info Badge */
.pc-alert-info {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    font-size: 0.8125rem;
}

.pc-alert-label {
    color: #6b7280;
}

.pc-alert-price {
    font-weight: 700;
    color: #2563eb;
}

/* Loading State */
.pc-action-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.pc-action-btn.loading svg {
    animation: pc-spin 1s linear infinite;
}

@keyframes pc-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Compact Style (for product cards) */
.pc-product-actions.compact {
    display: flex !important;
    gap: 0.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
}

.pc-product-actions.compact .pc-action-btn {
    padding: 0.625rem;
    border-radius: 0.5rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
}

.pc-product-actions.compact .pc-action-btn:hover {
    background: #e5e7eb;
}

.pc-product-actions.compact .btn-text {
    display: none;
}

/* Floating Style (overlay on product images) */
.pc-product-actions.floating {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    flex-direction: column;
    gap: 0.375rem;
}

.pc-product-actions.floating .pc-action-btn {
    padding: 0.5rem;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
}

.pc-product-actions.floating .btn-text {
    display: none;
}

/* Price Alert Modal */
.pc-alert-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.pc-alert-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pc-alert-modal {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.pc-alert-modal-overlay.active .pc-alert-modal {
    transform: scale(1);
}

.pc-alert-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.pc-alert-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pc-alert-modal-header h3 svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #2563eb;
}

.pc-alert-modal-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f3f4f6;
    border-radius: 0.375rem;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s ease;
}

.pc-alert-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.pc-alert-modal-close svg {
    width: 1rem;
    height: 1rem;
}

.pc-alert-modal-product {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
}

.pc-alert-modal-product img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 0.5rem;
    background: white;
}

.pc-alert-modal-product-info {
    flex: 1;
    min-width: 0;
}

.pc-alert-modal-product-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pc-alert-modal-product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2563eb;
    margin: 0;
}

.pc-alert-modal-form {
    margin-bottom: 1rem;
}

.pc-alert-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.pc-alert-form-input-wrapper {
    position: relative;
}

.pc-alert-form-input-wrapper .currency-prefix {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
}

.pc-alert-form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.pc-alert-form-input:focus {
    border-color: #2563eb;
}

.pc-alert-form-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.pc-alert-quick-picks {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.pc-alert-quick-pick {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pc-alert-quick-pick:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.pc-alert-modal-actions {
    display: flex;
    gap: 0.75rem;
}

.pc-alert-modal-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pc-alert-modal-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
}

.pc-alert-modal-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.pc-alert-modal-btn-secondary {
    background: white;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.pc-alert-modal-btn-secondary:hover {
    background: #fef2f2;
}

.pc-alert-modal-error {
    padding: 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    color: #dc2626;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
}

/* Upgrade Modal */
.pc-upgrade-modal {
    text-align: center;
}

.pc-upgrade-modal-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-upgrade-modal-icon svg {
    width: 2rem;
    height: 2rem;
    color: #d97706;
}

.pc-upgrade-modal h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
}

.pc-upgrade-modal p {
    color: #64748b;
    margin: 0 0 1.5rem 0;
}

.pc-upgrade-modal-btn {
    display: block;
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s ease;
}

.pc-upgrade-modal-btn:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: white;
}

/* Responsive */
@media (max-width: 640px) {
    .pc-product-actions:not(.compact):not(.floating) .btn-text {
        display: none;
    }
    
    .pc-product-actions:not(.compact):not(.floating) .pc-action-btn {
        padding: 0.625rem;
    }
    
    .pc-alert-modal {
        padding: 1.25rem;
    }
}