/* Toolbox Calculator Styles - Frontend */

.toolbox-calculator {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.toolbox-calculator-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
}

.toolbox-calculator-form {
    margin-bottom: 2rem;
}

.toolbox-form-group {
    margin-bottom: 1.5rem;
}

.toolbox-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}

.toolbox-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1f2937;
    box-sizing: border-box;
}

.toolbox-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.toolbox-input::placeholder {
    color: #9ca3af;
}

.toolbox-calculate-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toolbox-calculate-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.toolbox-calculate-btn:active {
    transform: translateY(0);
}

.toolbox-calculate-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.toolbox-results {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.toolbox-results h4 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.toolbox-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.toolbox-result-item:last-child {
    border-bottom: none;
}

.toolbox-label {
    font-weight: 500;
    color: #475569;
    font-size: 0.95rem;
}

.toolbox-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
    background: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    min-width: 80px;
    text-align: center;
}

/* Profit Margin Calculator Specific Styles */
.toolbox-profit-margin .toolbox-results {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #bae6fd;
}

.toolbox-profit-margin .toolbox-result-item:first-child .toolbox-value {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.toolbox-profit-margin .toolbox-result-item:nth-child(2) .toolbox-value {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.toolbox-profit-margin .toolbox-result-item:nth-child(3) .toolbox-value {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

/* Credit Card Payoff Calculator Specific Styles */
.toolbox-credit-card-payoff .toolbox-results {
    background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%);
    border-color: #e9d5ff;
}

.toolbox-credit-card-payoff .toolbox-result-item:first-child .toolbox-value {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #065f46;
}

.toolbox-credit-card-payoff .toolbox-result-item:nth-child(2) .toolbox-value {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.toolbox-credit-card-payoff .toolbox-result-item:nth-child(3) .toolbox-value {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

/* ROAS Calculator Specific Styles */
.toolbox-roas .toolbox-results {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #6ee7b7;
}

.toolbox-roas .toolbox-result-item:first-child .toolbox-value {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.toolbox-roas .toolbox-result-item:nth-child(2) .toolbox-value {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.toolbox-roas .toolbox-result-item:nth-child(3) .toolbox-value {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.toolbox-roas .toolbox-result-item:nth-child(4) .toolbox-value {
    background: #fce7f3;
    border-color: #f9a8d4;
    color: #be185d;
}

/* Image Converter Tool Styles */
.toolbox-tool {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.toolbox-tool-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
}

.toolbox-tool-form {
    margin-bottom: 2rem;
}

.toolbox-file-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #f9fafb;
    color: #1f2937;
    cursor: pointer;
}

.toolbox-file-input:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.toolbox-file-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Drag and Drop Styles */
.toolbox-form-group {
    position: relative;
}

.toolbox-form-group.toolbox-drag-over .toolbox-file-input {
    border-color: #10b981;
    background: #ecfdf5;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.toolbox-form-group.toolbox-drag-over::after {
    content: "Drop your image here";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
}

.toolbox-file-info {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f0f9ff;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #1e40af;
}

.toolbox-file-name {
    font-weight: 600;
    display: block;
}

.toolbox-file-size {
    color: #64748b;
    font-size: 0.75rem;
}

.toolbox-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1f2937;
    cursor: pointer;
}

.toolbox-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.toolbox-convert-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toolbox-convert-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.toolbox-convert-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.toolbox-preview {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    border: 1px solid #bae6fd;
}

.toolbox-preview h4 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.toolbox-image-preview {
    text-align: center;
}

.toolbox-image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toolbox-converted-image {
    text-align: center;
    margin-bottom: 1.5rem;
}

.toolbox-converted-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toolbox-download-section {
    text-align: center;
}

.toolbox-download-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toolbox-download-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    color: white;
    text-decoration: none;
}
/* Responsive Design */
@media (max-width: 768px) {
    .toolbox-calculator {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .toolbox-calculator-title {
        font-size: 1.25rem;
    }
    
    .toolbox-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .toolbox-value {
        align-self: stretch;
        text-align: left;
    }
}

/* Loading State */
.toolbox-calculator.loading .toolbox-calculate-btn {
    position: relative;
    color: transparent;
}

.toolbox-calculator.loading .toolbox-calculate-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: toolbox-spin 1s linear infinite;
}

@keyframes toolbox-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error States */
.toolbox-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.toolbox-error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.toolbox-input.error + .toolbox-error-message {
    display: block;
}

/* Success Animation */
.toolbox-results.show {
    animation: toolbox-slide-in 0.3s ease-out;
}

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