/**
 * Unit Converter Tool Styles
 */

.unit-converter-tool {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tool-header h3 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.tool-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.converter-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.category-selector {
    margin-bottom: 25px;
}

.category-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.category-selector select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.category-selector select:focus {
    outline: none;
    border-color: #0073ea;
    box-shadow: 0 0 0 3px rgba(0, 115, 234, 0.1);
}

.conversion-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group input,
.input-group select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #0073ea;
    box-shadow: 0 0 0 3px rgba(0, 115, 234, 0.1);
}

.input-group input[readonly] {
    background-color: #f8f9fa;
    color: #495057;
}

.swap-button {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swap-button button {
    width: 50px;
    height: 50px;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    background: white;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swap-button button:hover {
    border-color: #0073ea;
    color: #0073ea;
    transform: scale(1.1);
}

.conversion-options {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.conversion-options button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #0073ea 0%, #0056b3 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
}

.btn-outline {
    background: white;
    color: #0073ea;
    border: 2px solid #0073ea;
}

.btn-outline:hover {
    background: #0073ea;
    color: white;
    transform: translateY(-2px);
}

.conversion-history {
    border-top: 2px solid #f1f3f4;
    padding-top: 25px;
}

.conversion-history h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.history-item {
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.history-item:hover {
    border-color: #0073ea;
    background: #f8f9ff;
    transform: translateX(5px);
}

.history-content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.history-value {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.history-arrow {
    color: #0073ea;
    font-weight: bold;
    font-size: 16px;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.history-category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.history-time {
    color: #999;
}

.no-history {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.tool-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.info-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.info-section ul {
    margin: 0;
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.5;
}

.info-section strong {
    color: #333;
}

.status-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .conversion-inputs {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .swap-button {
        order: -1;
        margin-bottom: 10px;
    }
    
    .conversion-options {
        justify-content: center;
    }
    
    .conversion-options button {
        flex: 1;
        min-width: 120px;
    }
    
    .history-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .history-meta {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .converter-container {
        padding: 20px;
    }
    
    .tool-header {
        padding: 15px;
    }
    
    .tool-header h3 {
        font-size: 24px;
    }
    
    .conversion-options {
        flex-direction: column;
    }
    
    .conversion-options button {
        width: 100%;
    }
} 