/* ===========================
   Tools Shared Styles
   =========================== */

/* Import main styles if possible, or we recreate the necessary tokens 
   since we are in a subdirectory, relative path is ../styles.css */
@import url('../styles.css');

:root {
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --primary-gradient: linear-gradient(135deg, #FFB703 0%, #FF8C00 100%);
    --text-dark: #1F2937;
    --text-light: #6B7280;
}

body {
    background-color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.tool-container {
    max-width: 800px;
    margin: 120px auto 40px;
    /* Space for fixed navbar */
    padding: 20px;
    width: 95%;
}

/* Tool Card */
.tool-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: inline-block;
    background: rgba(255, 183, 3, 0.1);
    padding: 16px;
    border-radius: 50%;
}

.tool-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.tool-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #FFB703;
    box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.1);
}

.btn-generate {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 183, 3, 0.3);
}

.btn-generate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Results Area */
.result-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
    display: none;
    /* Hidden by default */
}

.result-area.active {
    display: block;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.markdown-content {
    line-height: 1.6;
    color: #374151;
}

.markdown-content h3 {
    color: #111827;
    margin: 1.5em 0 0.5em;
}

.markdown-content ul {
    padding-left: 20px;
    margin-bottom: 1em;
}

.markdown-content li {
    margin-bottom: 0.5em;
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ROI Specific */
.roi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.roi-metric {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #f3f4f6;
}

.roi-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-top: 8px;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Back Link */
.back-nav {
    position: absolute;
    top: 30px;
    left: 40px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.back-nav:hover {
    opacity: 1;
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .tool-container {
        padding: 10px;
        margin-top: 80px;
    }

    .tool-card {
        padding: 24px;
    }

    .back-nav {
        position: static;
        margin-bottom: 20px;
        display: inline-flex;
    }
}