/*
 * modules/tcm_affiliate/views/css/affiliate-settings.css
 * Styles dla panelu ustawień partnera afiliacyjnego
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2025 PrestaShop SA
 * @license   http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
 */

/* Main Container */
.affiliate-settings-panel {
    max-width: 800px;
    margin: 20px auto;
}
.form-group.text-center {
    text-align: center;
}

/* Balance Cards */
.balance-item {
    padding: 15px;
    background: linear-gradient(310deg, #DF8585, #F5F0EA);
    border-radius: 6px;
    text-align: center;
    margin-bottom: 10px;
}

.balance-item h3 {
    margin: 0 0 5px;
    font-size: 24px;
    font-weight: 600;
}

.balance-item small {
    color: #6c757d;
    font-size: 12px;
}

/* Payment Methods */
.payment-methods {
    margin: 15px 0;
}

.radio-custom {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
}

.radio-custom:hover {
    border-color: #DF8585;
    background: #f8f9fa;
}

.radio-custom input[type="radio"]:checked + label,
.radio-custom:has(input[type="radio"]:checked) {
    border-color: #DF8585;
    /*background: rgba(223, 133, 133, 0.1);*/

}

.radio-custom label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    display: flex;
}

.radio-custom label i {
    color: #DF8585;
    margin-right: 8px;
    width: 20px;
    align-content: center;
    margin-left: 8px;
}

.radio-custom small {
    display: block;
    color: #6c757d;
    font-weight: normal;
    margin-top: 5px;
}

/* Bank Details */
#bank-details {
    margin-top: 20px;
}

#bank-details .well {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
}

#bank-details h5 {
    margin-top: 0;
    color: #495057;
}

#bank-details h5 i {
    color: #DF8585;
    margin-right: 8px;
}

/* Form Elements */
.form-control {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
}

.form-control:focus {
    border-color: #DF8585;
    box-shadow: 0 0 0 0.2rem rgba(245, 240, 234, 0.25);
}

/* Save Button */
#save-settings-btn {
    min-width: 200px;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 6px;
}

#save-settings-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.btn-loading i.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert i {
    margin-right: 8px;
}

/* Panel Headers */
.panel-heading h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.panel-heading h4 i {
    margin-right: 8px;
}

/* Input Groups */
.input-group-addon {
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-left: none;
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
}

/* Help Text */
.help-block {
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .affiliate-settings-panel {
        margin: 10px;
    }

    .balance-item h3 {
        font-size: 24px;
    }

    .radio-custom {
        padding: 12px;
    }

    #bank-details .well {
        padding: 15px;
    }
}

button#save-settings-btn{
        color: #DF8585;
        background-color: transparent;
        border: 1px solid #DF8585;
}
button#save-settings-btn:hover{
    color: white;
    background-color: #DF8585;
}

/**
 * DODAJ TEN CSS NA KOŃCU PLIKU views/css/front.css
 * Stylowanie dla sekcji zamówień w affiliate-settings.tpl
 */

/* ==========================================
   SEKCJA ZAMÓWIEŃ - NOWE STYLE
   ========================================== */

/* Tabela zamówień */
.affiliate-orders-table {
    width: 100%;
    margin-bottom: 20px;
    background-color: #fff;
}

.affiliate-orders-table thead {
    background-color: #f8f9fa;
}

.affiliate-orders-table th {
    font-weight: 600;
    padding: 12px 8px;
    border: 1px solid #dee2e6;
    color: #495057;
    font-size: 14px;
}

.affiliate-orders-table td {
    padding: 12px 8px;
    border: 1px solid #dee2e6;
    vertical-align: middle;
    font-size: 14px;
}

.affiliate-orders-table tbody tr {
    transition: background-color 0.2s ease;
}

.affiliate-orders-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Kod referencyjny */
.affiliate-orders-table .order-reference {
    background-color: #f4f4f4;
    padding: 4px 8px;
    border-radius: 3px;
    font-family: 'Courier New', Consolas, monospace;
    color: #e83e8c;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    font-size: 15px;
}

.affiliate-orders-table .order-reference:hover {
    background-color: #e9ecef;
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Wartość prowizji */
.commission-value {
    color: #28a745 !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Label statusów */
.affiliate-orders-table .label {
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.label-warning {
    background-color: #ffc107;
    color: #000;
}

.label-success {
    background-color: #28a745;
    color: #fff;
}

.label-info {
    background-color: #17a2b8;
    color: #fff;
}

.label-danger {
    background-color: #dc3545;
    color: #fff;
}

.label-default {
    background-color: #6c757d;
    color: #fff;
}

/* Footer tabeli */
.affiliate-orders-table tfoot {
    background-color: #f8f9fa;
    font-weight: 600;
}

.affiliate-orders-table tfoot td {
    border-top: 2px solid #dee2e6;
    padding: 15px 8px;
}

/* Paginacja zamówień */
#orders-pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

#orders-pagination .page-item {
    margin: 0 3px;
}

#orders-pagination .page-link {
    display: block;
    padding: 8px 14px;
    color: #ffc107;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}

#orders-pagination .page-link:hover {
    color: #fff;
    background-color: #DF8585;
    border-color: #DF8585;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(223, 133, 133, 0.3);
}

#orders-pagination .page-item.active .page-link {
    background-color: #DF8585;
    color: #fff;
    border-color: #DF8585;
    font-weight: 600;
}

#orders-pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
    opacity: 0.6;
}

/* Animacje */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.affiliate-orders-table tbody tr {
    animation: fadeInUp 0.3s ease forwards;
}

/* Responsive dla tabeli zamówień */
@media (max-width: 768px) {
    .affiliate-orders-table {
        font-size: 12px;
    }

    .affiliate-orders-table th,
    .affiliate-orders-table td {
        padding: 8px 4px;
    }

    .affiliate-orders-table .order-reference {
        font-size: 11px;
        padding: 3px 6px;
    }

    #orders-pagination {
        flex-wrap: wrap;
    }

    #orders-pagination .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* Dodatkowe style dla lepszego UX */
.affiliate-orders-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.affiliate-orders-table tbody tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

/* Scroll anchor target */
#orders-section {
    scroll-margin-top: 100px;
}
