/* Echo AI Systems - Modular Tools CSS */
/* This file can be included on any page to style the tools */

/* Tool Interface Styles - Full Width Containers */
.tool-interface {
    display: none;
    background: rgba(15, 23, 42, 0.95);
    border-radius: 1rem;
    padding: 2.5rem;
    margin-top: 2rem;
    text-align: left;
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s ease-out;
    /* Full width without constraints */
    width: 100%;
    max-width: none;
    min-width: 100%;
}

.tool-interface.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-interface h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary, #e2e8f0);
}

/* Form Styles - Full Width */
.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary, #cbd5e1);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group select {
    width: 100%;
    max-width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.5rem;
    color: var(--text-primary, #e2e8f0);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary, #3b82f6);
    background: rgba(30, 41, 59, 1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

/* Results Section - Full Width */
.results {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 1rem;
    display: none;
    border: 1px solid rgba(148, 163, 184, 0.1);
    animation: fadeIn 0.5s ease-out;
    /* Full width results container */
    width: 100%;
    max-width: none;
    min-width: 100%;
    box-sizing: border-box;
}

.results.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary, #e2e8f0);
}

.result-item {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    width: 100%;
}

.result-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: var(--accent-primary, #3b82f6);
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-value {
    font-size: 1.125rem;
    color: var(--text-primary, #e2e8f0);
    line-height: 1.6;
}

/* Score Display */
.score-display {
    font-size: 4rem;
    font-weight: 800;
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 1rem;
    background: rgba(30, 41, 59, 0.3);
    position: relative;
    width: 100%;
}

.score-display::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-primary, #3b82f6), var(--accent-secondary, #8b5cf6));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
}

.score-good {
    color: #10b981;
}

.score-medium {
    color: #f59e0b;
}

.score-poor {
    color: #ef4444;
}

/* Recommendations - Full Width */
.recommendations {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-left: 4px solid var(--accent-primary, #3b82f6);
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.recommendations h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
}

.recommendations ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommendations li {
    color: var(--text-secondary, #cbd5e1);
    line-height: 1.8;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.recommendations li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-primary, #3b82f6);
    font-weight: 700;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: var(--accent-primary, #3b82f6);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: var(--accent-secondary, #8b5cf6);
    transform: translateX(-5px);
}

.back-btn::before {
    content: '←';
    font-size: 1.25rem;
}

/* Loading Animation */
.loading {
    display: none;
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
}

.loading.show {
    display: block;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-primary, #3b82f6);
    border-right-color: var(--accent-secondary, #8b5cf6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-secondary, #cbd5e1);
    font-size: 1.125rem;
}

/* Tool Card Modifications when tools are active */
.tool-card.tool-active {
    border-color: var(--accent-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.05);
}

/* Submit Button */
.tool-interface button[type="submit"],
.tool-interface .btn {
    background: linear-gradient(135deg, var(--accent-primary, #3b82f6), var(--accent-secondary, #8b5cf6));
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    width: auto;
    min-width: 150px;
}

.tool-interface button[type="submit"]:hover,
.tool-interface .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.3);
}

.tool-interface button[type="submit"]:active,
.tool-interface .btn:active {
    transform: translateY(0);
}

/* Tool link styling for homepage integration */
.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-primary, #3b82f6), var(--accent-secondary, #8b5cf6));
    color: white;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.tool-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.3);
}

/* FIXED: Grid Container - Force Vertical Stacking */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr;  /* Single column layout */
    gap: 2rem;
    width: 100%;
    max-width: 800px;  /* Constrain width for better readability */
    margin: 0 auto;    /* Center the grid */
}

/* Ensure tool cards stack vertically */
.tool-card {
    width: 100%;
    max-width: 100%;
    min-width: auto;  /* Remove minimum width constraint */
}

/* Responsive Design - Maintain Vertical Stacking */
@media (max-width: 768px) {
    .tool-interface {
        padding: 1.5rem;
        margin-top: 1rem;
        width: 100%;
        max-width: none;
    }
    
    .score-display {
        font-size: 3rem;
        padding: 1.5rem;
    }
    
    .results {
        padding: 1.5rem;
        width: 100%;
        max-width: none;
    }
    
    .form-group input,
    .form-group select {
        width: 100%;
        max-width: 100%;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;  /* Keep single column on mobile */
        max-width: 100%;
    }
}

/* For larger screens, still maintain single column but with better spacing */
@media (min-width: 1200px) {
    .tools-grid {
        max-width: 900px;  /* Slightly wider on large screens */
    }
}
