/* Tools Page Specific Styles */

/* Tool Container Layout */
.tool-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-8);
    margin-top: var(--space-6);
}

/* Input Panel */
.input-panel {
    background: linear-gradient(135deg, #FDFCFB 0%, #F9F7F4 100%);
    padding: var(--space-6);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.input-panel h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-5);
}

/* Form Styling */
.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group label i {
    color: var(--accent-primary);
    font-size: 14px;
}

.form-group .tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    margin-left: auto;
    transition: all 0.2s ease;
}

.form-group .tooltip:hover {
    background: #E5B12E;
    transform: scale(1.1);
}

.form-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(244, 196, 48, 0.1);
}

.form-group input[type="number"]:hover {
    border-color: #E5B12E;
}

/* Button Group */
.button-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn i {
    font-size: 16px;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--text-primary);
}

.btn-primary:hover {
    background: #E5B12E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 196, 48, 0.3);
}

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

.btn-secondary {
    background: #2C5F8D;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #234A6D;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 95, 141, 0.3);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Preview Panel */
.preview-panel {
    background: white;
    padding: var(--space-6);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.preview-panel h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-5);
}

#preview-container {
    width: 100%;
    min-height: 400px;
    background: #F9F7F4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

#preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-6);
}

/* Calculated Parameters */
#calculated-params {
    background: linear-gradient(135deg, #F4F2EF 0%, #F9F7F4 100%);
    padding: var(--space-5);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

#calculated-params h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.param-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.param-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.param-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.param-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Status Messages */
.status-message {
    margin-top: var(--space-4);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-message::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 16px;
}

.status-info {
    background: #D1ECF1;
    color: #0C5460;
    border: 1px solid #BEE5EB;
}

.status-info::before {
    content: '\f05a'; /* info-circle */
}

.status-success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.status-success::before {
    content: '\f058'; /* check-circle */
}

.status-error {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.status-error::before {
    content: '\f06a'; /* exclamation-circle */
}

/* Info Section */
.info-section {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF5D6 100%);
    padding: var(--space-6);
    border-radius: 12px;
}

.info-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-section h4 i {
    color: var(--accent-primary);
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .tool-container {
        grid-template-columns: 1fr;
    }

    .param-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .input-panel,
    .preview-panel {
        padding: var(--space-4);
    }

    #preview-container {
        min-height: 300px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Tag Styling (inherited from custom.css but with overrides if needed) */
.tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-primary);
    color: var(--text-primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Active nav link */
nav .links a.active {
    color: var(--accent-primary);
    font-weight: 600;
}
