/* Custom styles for the Chemical Engineering Calculator */

/* Fix for Select2 in Tailwind */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 42px;
    padding: 8px 4px;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

/* Tab styling */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

button[data-tab].active {
    background-color: #e0e7ff;
    color: #4338ca;
    border-bottom: 2px solid #4338ca;
}

/* Result containers */
.result-container {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
}

/* Property tables */
.property-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.property-table th,
.property-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.property-table th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #334155;
}

/* Loading indicator */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.loading::before {
    content: "";
    position: absolute;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
    z-index: 20;
    top: calc(50% - 1rem);
    left: calc(50% - 1rem);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Additional form styling */
input:focus, select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.25);
}

.form-group {
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.badge-blue {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-green {
    background-color: #dcfce7;
    color: #166534;
}

.badge-red {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Fitting item styling */
.fitting-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background-color: #f9fafb;
}

.fitting-remove {
    margin-left: auto;
    color: #ef4444;
    cursor: pointer;
}

/* Components styling */
.component-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background-color: #f9fafb;
}

.component-row input {
    flex: 1;
}

.component-remove {
    color: #ef4444;
    cursor: pointer;
}

/* Reactor plots */
.plot-container {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    overflow: hidden;
    margin-top: 1rem;
}

.plot-container img {
    width: 100%;
    height: auto;
    display: block;
} 