/* Currency Widget Styles */
.currency-widget {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007bff, #00bfff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 10px;
}

.currency-widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.currency-widget i {
    font-size: 1.5rem;
}

/* Currency Modal Styles */
.widget-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.widget-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.widget-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    color: #666;
    transition: color 0.3s ease;
}

.widget-close:hover {
    color: #333;
}

/* Currency Details Styles */
.currency-details {
    margin: 1.5rem 0;
}

.currency-details div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
}

.currency-details div:last-child {
    border-bottom: none;
}

.currency-icon {
    margin-right: 0.5rem;
    color: #007bff;
}

/* Currency Converter Styles */
.currency-converter {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #eee;
}

.converter-inputs {
    margin: 1rem 0;
}

.converter-inputs input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.converter-selects {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 1rem 0;
}

.converter-selects select {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
}

.converter-swap {
    display: flex;
    align-items: center;
}

#swap-currencies {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

#swap-currencies:hover {
    transform: rotate(180deg);
}

#conversion-result {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

/* Refresh Button Styles */
.refresh-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}

.last-updated {
    color: #666;
    font-size: 0.9rem;
}

.refresh-button-modern {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.refresh-button-modern:hover {
    transform: rotate(180deg);
}

.refresh-button-modern.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .widget-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
    }

    .converter-selects {
        flex-direction: column;
    }

    .converter-swap {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .currency-widget:hover {
        transform: none;
    }

    .refresh-button-modern:hover {
        transform: none;
    }
}

/* Currency Widget Styles */
.currency-details {
    margin-bottom: 1.5rem;
    background-color: rgba(0, 86, 179, 0.03);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 86, 179, 0.08);
}

.currency-details div {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease;
}

.currency-details div:hover {
    background-color: rgba(0, 86, 179, 0.05);
    border-radius: 4px;
}

.currency-details div:last-child {
    border-bottom: none;
}

.currency-details span:first-child {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.currency-details span:first-child::before {
    display: none;
}

.currency-details span:last-child {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.05rem;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.fa-dollar-sign.currency-icon {
    background-color: #0056b3;
}

.fa-euro-sign.currency-icon {
    background-color: #003399;
}

.fa-pound-sign.currency-icon {
    background-color: #7D3C98;
}

.fa-yen-sign.currency-icon {
    background-color: #E74C3C;
}

.fa-ruble-sign.currency-icon {
    background-color: #2980B9;
}

.fa-won-sign.currency-icon {
    background-color: #1ABC9C;
}

.refresh-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.last-updated {
    font-size: 0.75rem;
    color: var(--text-lighter);
    font-style: italic;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.last-updated.pulse {
    color: var(--primary-color);
    animation: text-pulse 1s ease;
}

@keyframes text-pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.last-updated::before {
    content: "\f017";
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    margin-right: 0.25rem;
    font-size: 0.7rem;
    opacity: 0.7;
}

.refresh-button-modern {
    background-color: var(--bg-light);
    color: var(--primary-color);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.refresh-button-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.refresh-button-modern:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.refresh-button-modern:hover::before {
    opacity: 0.3;
}

.refresh-button-modern:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.refresh-button-modern i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.refresh-button-modern.refreshing i {
    animation: rotate 1s linear infinite;
}

.currency-converter {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.currency-converter h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.converter-inputs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.converter-inputs input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}

.converter-inputs input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

.converter-selects {
    display: flex;
    gap: 0.75rem;
}

.converter-selects select {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    background-color: var(--bg-white);
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.05rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230056b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.converter-selects select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

.converter-selects select option {
    font-weight: 500;
    padding: 8px;
}

.converter-swap {
    display: flex;
    align-items: center;
    justify-content: center;
}

#swap-currencies {
    background-color: var(--bg-light);
    color: var(--primary-color);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

#swap-currencies:hover {
    background-color: var(--primary-color);
    color: white;
}

#swap-currencies.rotating i {
    animation: rotate 0.5s ease;
}

#conversion-result {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    padding: 0.8rem;
    background-color: rgba(0, 86, 179, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 86, 179, 0.1);
    font-size: 1.15rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.result-updated {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Widget Content Heading */
.widget-content h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.widget-content h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.widget-content h3 i {
    color: var(--secondary-color);
}

.value-updated {
    animation: highlight-value 1.5s ease;
}

@keyframes highlight-value {
    0% { background-color: rgba(0, 86, 179, 0.1); }
    50% { background-color: rgba(0, 86, 179, 0.2); }
    100% { background-color: transparent; }
} 