/* assets/frontend.css */

/* Currency Table Styles */
.ace-currency-table-wrapper {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ace-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.ace-table-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.8rem;
}

.ace-last-update {
    font-size: 0.9rem;
    color: #666;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
}

.ace-table-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ace-filter-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: #fff;
    color: #555;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.ace-filter-btn:hover {
    border-color: #007cba;
    color: #007cba;
}

.ace-filter-btn.active {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
}

.ace-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ace-currency-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 600px;
}

.ace-currency-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.ace-currency-table th,
.ace-currency-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ace-currency-table th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ace-currency-table tbody tr {
    transition: background-color 0.2s ease;
}

.ace-currency-table tbody tr:hover {
    background-color: #f8f9fa;
}

.ace-currency-row {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.ace-currency-row.hidden {
    display: none;
}

.ace-currency-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ace-currency-code {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
}

.ace-currency-name {
    color: #666;
    font-size: 0.9rem;
}

.ace-currency-type {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.ace-crypto {
    background: #ff6b35;
    color: #fff;
}

.ace-traditional {
    background: #2196f3;
    color: #fff;
}

.ace-rate {
    font-weight: 600;
    color: #333;
}

.ace-buy-rate {
    color: #28a745;
    font-weight: bold;
}

.ace-sell-rate {
    color: #dc3545;
    font-weight: bold;
}

.ace-spread {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.ace-loading-row td {
    text-align: center;
    padding: 40px;
    color: #666;
}

.ace-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.ace-table-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.ace-base-currency {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.ace-disclaimer {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* Calculator Styles */
.ace-calculator-wrapper {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.ace-calculator-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.ace-calculator-header h3 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 300;
}

.ace-calculator-header p {
    margin: 0;
    opacity: 0.9;
}

.ace-calculator-form {
    padding: 30px;
}

.ace-calc-row {
    margin-bottom: 25px;
}

.ace-transaction-type label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.ace-radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ace-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.ace-radio-label input[type="radio"] {
    margin-right: 8px;
}

.ace-conversion-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
}

.ace-currency-input label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.ace-currency-input input[type="number"] {
min-width:100px;
}

.ace-input-group {
    display: flex;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.ace-input-group:focus-within {
    border-color: #007cba;
}

.ace-input-group input {
    flex: 1;
    padding: 15px;
    border: none;
    outline: none;
    font-size: 1.1rem;
    background: #fff;
}

.ace-input-group select {
    padding: 15px;
    border: none;
    outline: none;
    background: #f8f9fa;
    border-left: 1px solid #e0e0e0;
    cursor: pointer;
    min-width: 200px;
}

.ace-swap-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ace-swap-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #007cba;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ace-swap-btn:hover {
    background: #007cba;
    color: #fff;
    transform: rotate(180deg);
}

.ace-swap-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.ace-calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ace-calculate-btn:hover {
    transform: translateY(-2px);
}

.ace-calculate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.ace-calc-result {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.ace-result-summary {
    display: grid;
    gap: 12px;
}

.ace-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ace-result-item label {
    font-weight: 500;
    color: #555;
}

.ace-result-item span {
    font-weight: 600;
    color: #333;
}

.ace-result-item.total {
    border-top: 2px solid #ddd;
    padding-top: 12px;
    margin-top: 10px;
}

.ace-result-item.total label,
.ace-result-item.total span {
    font-size: 1.2rem;
    font-weight: bold;
    color: #28a745;
}

.ace-result-actions {
    margin-top: 20px;
    text-align: center;
}

.ace-contact-btn {
    padding: 12px 30px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ace-contact-btn:hover {
    background: #218838;
}

.ace-calculator-info {
    background: #f8f9fa;
    padding: 25px 30px;
    border-top: 1px solid #eee;
}

.ace-info-item h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
}

.ace-info-item ul {
    margin: 0;
    padding-left: 20px;
}

.ace-info-item li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.5;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ace-calc-result {
    animation: fadeIn 0.5s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ace-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ace-table-header h3 {
        font-size: 1.5rem;
    }
    
    .ace-conversion-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ace-swap-container {
        order: 3;
    }
    
    .ace-swap-btn {
        transform: rotate(90deg);
    }
    
    .ace-swap-btn:hover {
        transform: rotate(270deg);
    }
    
    .ace-calculator-header {
        padding: 20px;
    }
    
    .ace-calculator-header h3 {
        font-size: 1.6rem;
    }
    
    .ace-calculator-form {
        padding: 20px;
    }
    
    .ace-input-group select {
        min-width: 150px;
        font-size: 0.9rem;
    }
    
    .ace-radio-group {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .ace-currency-table th,
    .ace-currency-table td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
    
    .ace-table-filters {
        justify-content: center;
    }
    
    .ace-filter-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}