/* Hull Displacement Calculator Styles */

/* Variables */
:root {
    --hdc-primary: #096D6D;
    --hdc-secondary: #07385D;
    --hdc-text-color: #1A202C;
    --hdc-success: #28a745;
    --hdc-danger: #dc3545;
    --hdc-warning: #ffc107;
    --hdc-info: #17a2b8;
    --hdc-light-bg: #f8f9fa;
}

/* General styles */
.hdc-calculator-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--hdc-text-color);
}

/* Card styling */
.hdc-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hdc-header {
    background: linear-gradient(135deg, var(--hdc-secondary) 0%, var(--hdc-primary) 100%);
    color: #fff !important;
    padding: 1.5rem;
    border-bottom: 3px solid var(--hdc-primary);
}

.hdc-header h4 {
    font-weight: 600;
    margin: 0;
}

/* Input styles */
.form-control, .form-select {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--hdc-primary);
    box-shadow: 0 0 0 0.2rem rgba(9, 109, 109, 0.25);
}

.input-group-sm .form-control,
.input-group-sm .form-select {
    height: calc(1.8125rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Button styles */
.hdc-btn-primary {
    background: linear-gradient(135deg, var(--hdc-primary) 0%, var(--hdc-secondary) 100%);
    border: none;
    color: #fff !important;
    transition: all 0.3s ease;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

.hdc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 56, 93, 0.4);
    color: #fff !important;
}

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

/* Loading state */
.hdc-btn-loading {
    position: relative;
    color: transparent !important;
}

.hdc-btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: hdc-spin 0.8s linear infinite;
}

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

/* Text colors */
.hdc-text-primary { color: var(--hdc-primary) !important; }
.hdc-text-secondary { color: var(--hdc-secondary) !important; }

/* Results styling */
.hdc-output-panel {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.hdc-highlight-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid var(--hdc-primary) !important;
    box-shadow: 0 4px 15px rgba(9, 109, 109, 0.15);
}

.hdc-output-value {
    background: linear-gradient(135deg, var(--hdc-primary) 0%, var(--hdc-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700 !important;
}

/* Buoyancy visualization */
.buoyancy-visualization-container {
    border: 1px solid #dee2e6;
}

.water-surface {
    border-bottom: 2px dashed #096D6D !important;
}

.hull-outline {
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.1);
}

.displaced-water {
    transition: height 1s ease-in-out;
}

.buoyancy-value {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    z-index: 10;
}

/* Chart container */
.chart-container {
    background: var(--hdc-light-bg);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

/* Form text */
.form-text {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Message box */
#hdc-message {
    border-radius: 0.5rem;
    border: none;
}

/* Loading spinner */
.spinner-border.hdc-text-primary {
    color: var(--hdc-primary) !important;
}

/* Section transitions */
.dimensions-section,
.displacement-section {
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .border-end {
        border-right: none !important;
        border-bottom: 1px solid #dee2e6;
        padding-bottom: 2rem;
        margin-bottom: 1rem;
    }
    
    .hdc-output-value {
        font-size: 1.75rem !important;
    }
}

@media (min-width: 768px) {
    .hdc-output-value {
        font-size: 2.5rem;
    }
}

/* Ensure everything is visible */
.hdc-calculator-container,
#hdc-form,
#hdc-results,
#calculateBtn {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#hdc-results.d-none {
    display: none !important;
}