/**
 * Plot2ist Tools - Universal Styles
 * Theme-agnostic styling for Plot2ist calculator tools
 */

.plot2ist-calc {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calc-container h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
}

.calc-inputs {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

.input-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #2271b1;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    cursor: help;
    font-style: normal;
}

.calc-input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.calc-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.calc-button {
    width: 100%;
    padding: 1rem;
    background: #2271b1;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.calc-button:hover {
    background: #135e96;
}

.calc-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.result-box {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #ddd;
}

.result-box h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.result-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2271b1;
}

@media (max-width: 600px) {
    .plot2ist-calc {
        padding: 1rem;
    }
    
    .calc-results {
        grid-template-columns: 1fr;
    }
}

/* Tools Grid Styles */
.plot2ist-tools-grid-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.plot2ist-tools-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.plot2ist-tool-search,
.plot2ist-category-filter {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: white;
}

.plot2ist-tool-search {
    flex: 1;
    min-width: 250px;
}

.plot2ist-category-filter {
    min-width: 200px;
}

.plot2ist-tool-search:focus,
.plot2ist-category-filter:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.plot2ist-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.plot2ist-tool-item {
    position: relative;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.plot2ist-tool-item:not(.plot2ist-tool-locked):hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.plot2ist-tool-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.plot2ist-tool-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    color: #333;
}

.plot2ist-tool-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.plot2ist-tool-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f0f0f0;
    color: #666;
    font-size: 0.8rem;
    border-radius: 12px;
    font-weight: 500;
}

.plot2ist-tool-description {
    margin: 0 0 1rem 0;
    color: #666;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.plot2ist-tool-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #2271b1;
    color: white !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
    align-self: flex-start;
}

.plot2ist-tool-link:hover {
    background: #135e96;
}

/* Locked tool styles */
.plot2ist-tool-locked {
    opacity: 0.4;
    filter: grayscale(100%);
    position: relative;
}

.plot2ist-tool-locked .plot2ist-tool-content {
    pointer-events: none;
}

.plot2ist-locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(1px);
    border-radius: 8px;
    z-index: 1;
    pointer-events: none;
}

.plot2ist-locked-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(34, 113, 177, 0.95);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2;
    pointer-events: none;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.plot2ist-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .plot2ist-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .plot2ist-tools-controls {
        flex-direction: column;
    }
    
    .plot2ist-tool-search,
    .plot2ist-category-filter {
        width: 100%;
        min-width: auto;
    }
    
    .plot2ist-locked-message {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
        white-space: normal;
        max-width: 80%;
    }
}

@media (max-width: 480px) {
    .plot2ist-tools-grid-wrapper {
        padding: 0 0.5rem;
    }
    
    .plot2ist-tool-item {
        padding: 1rem;
    }
}

