/* Currency Converter Tool Specific Styles */

/* Tool Header */
.tool-header {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    margin-top: 70px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tool-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.tool-header-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fbbf24;
    backdrop-filter: blur(10px);
}

.tool-header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tool-header-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.tool-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tool-features .feature {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-features .feature i {
    color: #fbbf24;
}

/* Currency Tool Section */
.currency-tool {
    padding: 80px 0;
    background: #f8fafc;
}

/* Converter Form */
.converter-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.form-row {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.amount-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.form-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
    min-width: 120px;
}

.form-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

/* Currency Selector */
.currency-selector {
    position: relative;
    min-width: 120px;
}

.currency-select {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    padding-right: 3rem;
}

.currency-select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.currency-flag {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

/* Swap Button */
.swap-button {
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Conversion Result */
.conversion-result {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.result-header {
    padding: 2rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    text-align: center;
}

.result-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.rate-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.rate-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.rate-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #10b981;
}

.rate-time {
    font-size: 0.85rem;
    color: #64748b;
}

/* Result Display */
.result-display {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: white;
}

.from-amount,
.to-amount {
    text-align: center;
    flex: 1;
    max-width: 200px;
}

.amount-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.currency-name {
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
}

.conversion-arrow {
    font-size: 1.5rem;
    color: #10b981;
    padding: 1rem;
}

/* Result Details */
.result-details {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.detail-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.detail-value {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 600;
}

/* Popular Currency Pairs */
.popular-pairs {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.popular-pairs h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
}

.pairs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.pair-item {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pair-item:hover {
    border-color: #10b981;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.1);
}

.pair-currencies {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.pair-rate {
    font-size: 1.2rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 0.5rem;
}

.pair-change {
    font-size: 0.85rem;
    color: #64748b;
}

.pair-change.positive {
    color: #10b981;
}

.pair-change.negative {
    color: #ef4444;
}

/* Conversion History */
.conversion-history {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.conversion-history h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.history-item:hover {
    background: #f8fafc;
}

.history-item:last-child {
    border-bottom: none;
}

.history-conversion {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-amounts {
    font-weight: 600;
    color: #1e293b;
}

.history-rate {
    font-size: 0.85rem;
    color: #64748b;
}

.history-time {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto 2rem;
}

.error-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-state h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.error-state p {
    color: #64748b;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-header-text h1 {
        font-size: 2rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .amount-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .result-display {
        flex-direction: column;
        gap: 1rem;
    }
    
    .from-amount,
    .to-amount {
        max-width: none;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .pairs-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 100px 0 60px;
        margin-top: 60px;
    }
    
    .tool-header-text h1 {
        font-size: 1.8rem;
    }
    
    .tool-features {
        flex-direction: column;
        align-items: center;
    }
    
    .converter-form {
        padding: 1.5rem;
    }
    
    .form-input,
    .currency-select {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .amount-value {
        font-size: 1.5rem;
    }
    
    .conversion-arrow {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .action-buttons,
    .converter-form {
        display: none !important;
    }
    
    .currency-tool {
        background: white;
        padding: 0;
    }
    
    .conversion-result,
    .popular-pairs,
    .conversion-history {
        box-shadow: none;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
    
    .result-header {
        background: white !important;
    }
}
