/* WooCommerce Cashback Wallet - Основные стили */

/* ===== Общие стили ===== */
.wcw-wallet-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Карточка баланса ===== */
.wcw-balance-card {
    background: linear-gradient(135deg, #f06f24 0%, #f06f24 100%);
    border-radius: 16px;
    padding: 40px;
    color: white;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.wcw-balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

.wcw-balance-content {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.wcw-balance-icon {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.wcw-balance-icon svg {
    width: 48px;
    height: 48px;
    color: #ffffff;
    stroke: currentColor;
    fill: currentColor;
}

/* Если SVG вставлена как <img> */
.wcw-balance-icon img {
    filter: brightness(0) invert(1);
    width: 48px;
    height: 48px;
}

.wcw-balance-info h3 {
    margin: 0 0 12px 0;
    font-size: 30px;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

.wcw-balance-amount {
    font-size: clamp(32px, 8vw, 48px);
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    color: #ffffff !important;
}

.wcw-balance-amount span,
.wcw-balance-amount .amount,
.wcw-balance-amount .woocommerce-Price-amount {
    color: #ffffff !important;
}

.wcw-balance-description {
    margin: 0;
    opacity: 0.9;
    font-size: clamp(14px, 3vw, 16px);
    max-width: 400px;
    color: #ffffff;
}

.wcw-balance-actions .button {
    background: white;
    color: #242424;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: clamp(7px, 3vw, 8px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    width: auto;
    min-width: 160px;
}

.wcw-balance-actions .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background: #f8f9fa;
}

/* ===== Информационные карточки ===== */
.wcw-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.wcw-info-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.wcw-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: #f06f24;
}

.wcw-info-icon {
    background: linear-gradient(135deg, #f06f24 0%, #f06f24 100%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wcw-info-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.wcw-info-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.wcw-info-content p {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

/* ===== История транзакций ===== */
.wcw-transactions-section {
    background: white;
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.wcw-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f3f4;
}

.wcw-section-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
    font-weight: 700;
}

.wcw-transactions-count {
    color: #333;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
}

.wcw-transactions-table {
    overflow-x: auto;
}

.wcw-transactions-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.wcw-transactions-table th {
    text-align: left;
    padding: 18px 16px;
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
}

.wcw-transactions-table td {
    padding: 18px 16px;
    border-bottom: 1px solid #e9ecef;
    color: #83b735;
    font-size: 15px;
}

.wcw-transactions-table tbody tr:hover {
    background: #f8f9fa;
}

.wcw-type-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcw-type-cashback { color: #83b735; }
.wcw-type-payment  { color: #f06f24; }
.wcw-type-refund   { color: #b64604; }
.wcw-type-manual   { color: #71973b; }
.wcw-type-review   { color: #71973b; }

.positive { color: #83b735; font-weight: 600; }
.negative { color: #f06f24; font-weight: 600; }

.wcw-empty-state {
    text-align: center;
    padding: 80px 40px;
}

.wcw-empty-state svg {
    stroke: #adb5bd;
    margin-bottom: 25px;
    opacity: 0.5;
}

.wcw-empty-state h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 22px;
    font-weight: 600;
}

.wcw-empty-state p {
    margin: 0 0 30px 0;
    color: #6c757d;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
    line-height: 1.6;
}

.wcw-empty-state .button {
    min-width: 220px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #f06f24 0%, #f06f24 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.wcw-empty-state .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.wcw-load-more {
    text-align: center;
    margin-top: 40px;
}

#wcw_load_more_transactions {
    padding: 14px 40px;
    font-size: 16px;
    background: white;
    border: 2px solid #f06f24;
    color: #f06f24;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

#wcw_load_more_transactions:hover:not(:disabled) {
    background: #f06f24;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

#wcw_load_more_transactions:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Стили для страницы оплаты ===== */
.wcw-checkout-payment {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.wcw-payment-header {
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    background: linear-gradient(135deg, #f06f24 0%, #f06f24 100%);
    color: white;
}

.wcw-payment-header h3 {
    margin: 0;
    font-size: 20px;
    display: flex;
    gap: 12px;
    font-weight: 600;
    color: #fff;
}

.wcw-payment-header svg {
    color: white;
}

.wcw-balance-info {
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.wcw-balance-label {
    opacity: 0.9;
}

.wcw-payment-body {
    padding: 20px;
}

.wcw-payment-applied {
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    background: #e1f3c7;
    border: 1px solid #b7d28f;
    border-radius: 10px;
    padding: 16px;
}

.wcw-applied-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.wcw-applied-icon {
    width: 60px;
    height: 60px;
    background: rgba(106, 148, 38, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wcw-applied-icon svg {
    stroke: #83b735;
}

.wcw-applied-details h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #155724;
}

.wcw-applied-details p {
    margin: 0 0 6px 0;
    color: #155724;
    opacity: 0.9;
    font-size: 15px;
}

.wcw-remaining-balance {
    font-weight: 600;
    color: #83b735 !important;
}

.wcw-remove-payment {
    background: #f06f24;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px !important;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.wcw-remove-payment:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.wcw-option-header {
    margin-bottom: 25px;
}

.wcw-option-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.wcw-option-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.wcw-option-btn {
    padding: 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    cursor: pointer;
    text-align: center;
}

.wcw-option-btn:hover {
    border-color: #f06f24;
    color: #f06f24;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.wcw-option-btn.active {
    background: linear-gradient(135deg, #f06f24 0%, #f06f24 100%);
    border-color: transparent;
    color: white;
    border-radius: 10px;
}

.wcw-option-btn svg {
    stroke: currentColor;
}

.wcw-custom-amount,
.wcw-full-payment {
    animation: fadeIn 0.3s ease-out;
}

.wcw-amount-input {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 25px;
}

.wcw-amount-input label {
    display: block;
    margin-bottom: 25px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.wcw-amount-hint {
    float: right;
    font-weight: normal;
    color: #666;
    font-size: 14px;
}

.wcw-amount-controls {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 25px;
}

.wcw-amount-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 24px;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wcw-amount-btn:hover {
    background: #f06f24;
    border-color: #f06f24;
    color: white;
    transform: translateY(-2px);
}

.wcw-amount-wrapper {
    flex: 1;
    position: relative;
}

.wcw-currency {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #495057;
    font-weight: 600;
    font-size: 13px;
}

#wcw_custom_amount {
    width: 100%;
    padding: 4px 4px 4px 4px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    text-align: left;
    background: white;
    transition: border-color 0.3s;
}

#wcw_custom_amount:focus {
    border-color: #f06f24;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.wcw-amount-slider {
    margin-top: 30px;
}

#wcw_amount_slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e9ecef;
    border-radius: 4px;
    outline: none;
    margin-bottom: 10px;
}

#wcw_amount_slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f06f24 0%, #f06f24 100%);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

#wcw_amount_slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.wcw-slider-labels {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

.wcw-amount-preview {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
}

.wcw-preview-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: #666;
    font-size: 16px;
}

.wcw-preview-item:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
}

.wcw-preview-item.total {
    border-top: 2px solid #e9ecef;
    margin-top: 15px;
    padding-top: 20px;
    font-weight: 700;
    color: #333;
    font-size: 18px;
}

.wcw-preview-amount {
    color: #83b735;
    font-weight: 600;
}

.wcw-preview-total {
    color: #f06f24;
    font-weight: 600;
}

.wcw-full-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    background: rgba(255, 233, 221);
    border: 1px solid rgba(254, 199, 167);
    border-radius: 10px;
    padding: 25px;
}

.wcw-full-icon {
    width: 60px;
    height: 60px;
    background: rgb(255, 203, 172);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wcw-full-icon svg {
    stroke: #83b735;
}

.wcw-full-details h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.wcw-full-details p {
    margin: 0 0 6px 0;
    color: #666;
    font-size: 15px;
}

.wcw-apply-payment {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #f06f24 0%, #f06f24 100%);
    color: white !important;
    border: none;
    border-radius: 10px !important;
    transition: all 0.3s;
    cursor: pointer;
}

.wcw-apply-payment:hover:not(:disabled) {
    transform: translateY(-2px);
}

.wcw-apply-payment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-radius: 12px;
}

.wcw-messages {
    margin-top: 20px;
}

.wcw-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: none;
    animation: slideIn 0.3s ease-out;
}

.wcw-message.success {
    background: #b7d28f;
    color: #155724;
    border: 1px solid #b7d28f;
    display: block;
}

.wcw-message.error {
    background: #f5b997;
    color: #721c24;
    border: 1px solid #f5b997;
    display: block;
}

.wcw-cashback-notice {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eeeeee 100%);
    border-top: 1px solid #dddddd;
}

.wcw-notice-icon svg {
    stroke: #666666;
}

.wcw-notice-content p {
    margin: 0;
    color: #666666;
    font-size: 15px;
    line-height: 1.5;
}

/* ===== Иконка кешбэка рядом с ценой — анти-Woodmart версия ===== */

/* Базовый стиль — с максимальной специфичностью */
html body .wcw-product-cashback--inline,
html body.woocommerce .wcw-product-cashback--inline,
html body.woocommerce-page .wcw-product-cashback--inline,
html body .products .wcw-product-cashback--inline,
html body.woocommerce .products .wcw-product-cashback--inline,
html body .product-grid-item .wcw-product-cashback--inline,
html body .wd-product .wcw-product-cashback--inline,
html body li.product .wcw-product-cashback--inline,
html body ul.products li.product .wcw-product-cashback--inline,
html body.woocommerce ul.products li.product .wcw-product-cashback--inline,
html body .woocommerce-loop-product__link .wcw-product-cashback--inline,
html body .product-wrapper .wcw-product-cashback--inline,
html body .content-product .wcw-product-cashback--inline,
html body .single-product .wcw-product-cashback--inline {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    margin-left: 8px !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 3px 10px !important;
    background: linear-gradient(135deg, #fff5ed 0%, #ffe8d6 100%) !important;
    background-color: #fff5ed !important;
    border: 1px solid #ffd1a8 !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    color: #e05d1a !important;
    cursor: default !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    font-family: inherit !important;
    font-weight: 700 !important;
    height: auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    box-shadow: none !important;
    float: none !important;
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
}

/* Ховер */
html body .wcw-product-cashback--inline:hover {
    background: linear-gradient(135deg, #ffe8d6 0%, #ffd1a8 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(240, 111, 36, 0.2) !important;
}

/* Иконка кошелька — с максимальной специфичностью */
html body .wcw-product-cashback--inline .wcw-product-cashback-icon,
html body.woocommerce .wcw-product-cashback--inline .wcw-product-cashback-icon,
html body .products .wcw-product-cashback--inline .wcw-product-cashback-icon,
html body .product-grid-item .wcw-product-cashback--inline .wcw-product-cashback-icon,
html body li.product .wcw-product-cashback--inline .wcw-product-cashback-icon,
html body ul.products li.product .wcw-product-cashback--inline .wcw-product-cashback-icon,
html body .content-product .wcw-product-cashback--inline .wcw-product-cashback-icon,
html body .product-wrapper .wcw-product-cashback--inline .wcw-product-cashback-icon {
    display: block !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    color: #f06f24 !important;
    stroke: #f06f24 !important;
    fill: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    align-self: center !important;
    vertical-align: middle !important;
}

/* Текст суммы */
html body .wcw-product-cashback--inline .wcw-product-cashback-text,
html body.woocommerce .wcw-product-cashback--inline .wcw-product-cashback-text,
html body .products .wcw-product-cashback--inline .wcw-product-cashback-text,
html body .product-grid-item .wcw-product-cashback--inline .wcw-product-cashback-text,
html body li.product .wcw-product-cashback--inline .wcw-product-cashback-text,
html body ul.products li.product .wcw-product-cashback--inline .wcw-product-cashback-text,
html body .content-product .wcw-product-cashback--inline .wcw-product-cashback-text,
html body .product-wrapper .wcw-product-cashback--inline .wcw-product-cashback-text,
html body .wcw-product-cashback--inline .woocommerce-Price-amount,
html body .wcw-product-cashback--inline .woocommerce-Price-currencySymbol,
html body .wcw-product-cashback--inline bdi,
html body.woocommerce .wcw-product-cashback--inline .woocommerce-Price-amount,
html body .products .wcw-product-cashback--inline .woocommerce-Price-amount,
html body .product-grid-item .wcw-product-cashback--inline .woocommerce-Price-amount {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #e05d1a !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-family: inherit !important;
    white-space: nowrap !important;
}

/* На странице одного товара — тот же размер */
html body.single-product .wcw-product-cashback--inline,
html body.single-product .wcw-product-cashback--inline.wcw-product-cashback--single {
    font-size: 12px !important;
    padding: 3px 10px !important;
    margin-left: 8px !important;
    gap: 5px !important;
}

html body.single-product .wcw-product-cashback--inline .wcw-product-cashback-text,
html body.single-product .wcw-product-cashback--inline .woocommerce-Price-amount {
    font-size: 12px !important;
}

/* Адаптив */
@media (max-width: 480px) {
    html body .wcw-product-cashback--inline,
    html body.woocommerce .wcw-product-cashback--inline,
    html body .products .wcw-product-cashback--inline,
    html body .product-grid-item .wcw-product-cashback--inline,
    html body li.product .wcw-product-cashback--inline {
        font-size: 11px !important;
        padding: 2px 8px !important;
        margin-left: 6px !important;
        gap: 4px !important;
    }
    
    html body .wcw-product-cashback--inline .wcw-product-cashback-icon,
    html body .products .wcw-product-cashback--inline .wcw-product-cashback-icon,
    html body .product-grid-item .wcw-product-cashback--inline .wcw-product-cashback-icon,
    html body li.product .wcw-product-cashback--inline .wcw-product-cashback-icon {
        width: 12px !important;
        height: 12px !important;
    }
    
    html body .wcw-product-cashback--inline .wcw-product-cashback-text,
    html body .wcw-product-cashback--inline .woocommerce-Price-amount,
    html body .products .wcw-product-cashback--inline .wcw-product-cashback-text,
    html body li.product .wcw-product-cashback--inline .wcw-product-cashback-text {
        font-size: 11px !important;
    }
}