/**
 * Metalloy Steel - Interactive Calculators & 3D Visualizer Master Stylesheet
 * External CSS for:
 * - Angle Weight Calculator
 * - Flat Bar Weight Calculator
 * - Pipe & Tube Weight Calculator
 * - Round Bar Weight Calculator
 * - Sheet & Plate Weight Calculator
 */

/* ========================================================
   1. RANGE SLIDERS (Cross-Browser Red Accent)
   ======================================================== */
.calc-wrap input[type="range"],
.angle-calc-wrap input[type="range"],
.sheet-calc-wrap input[type="range"],
.pipe-calc-wrap input[type="range"],
.flat-bar-calc-wrap input[type="range"],
.round-bar-calc-wrap input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
}

.calc-wrap input[type="range"]::-webkit-slider-thumb,
.angle-calc-wrap input[type="range"]::-webkit-slider-thumb,
.sheet-calc-wrap input[type="range"]::-webkit-slider-thumb,
.pipe-calc-wrap input[type="range"]::-webkit-slider-thumb,
.flat-bar-calc-wrap input[type="range"]::-webkit-slider-thumb,
.round-bar-calc-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e11d48;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 4px rgba(225, 29, 72, 0.4);
}

.calc-wrap input[type="range"]::-webkit-slider-thumb:hover,
.angle-calc-wrap input[type="range"]::-webkit-slider-thumb:hover,
.sheet-calc-wrap input[type="range"]::-webkit-slider-thumb:hover,
.pipe-calc-wrap input[type="range"]::-webkit-slider-thumb:hover,
.flat-bar-calc-wrap input[type="range"]::-webkit-slider-thumb:hover,
.round-bar-calc-wrap input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #be123c;
    box-shadow: 0 0 10px rgba(225, 29, 72, 0.5);
}

.calc-wrap input[type="range"]::-moz-range-thumb,
.angle-calc-wrap input[type="range"]::-moz-range-thumb,
.sheet-calc-wrap input[type="range"]::-moz-range-thumb,
.pipe-calc-wrap input[type="range"]::-moz-range-thumb,
.flat-bar-calc-wrap input[type="range"]::-moz-range-thumb,
.round-bar-calc-wrap input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: #e11d48;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(225, 29, 72, 0.4);
}

/* ========================================================
   2. BUTTON CHIPS & ACTIVE SELECTIONS
   ======================================================== */
.calc-wrap .thickBtn.active,
.angle-calc-wrap .thickBtn.active,
.angle-calc-wrap .angleTypeBtn.active,
.sheet-calc-wrap .thickBtn.active,
.sheet-calc-wrap .presetBtn.active,
.pipe-calc-wrap .schBtn.active,
.pipe-calc-wrap .lenBtn.active,
.flat-bar-calc-wrap .thickBtn.active,
.round-bar-calc-wrap .thickBtn.active {
    background: #e11d48 !important;
    color: #ffffff !important;
    border-color: #e11d48 !important;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.25);
}

.calc-wrap .thickBtn,
.angle-calc-wrap .thickBtn,
.sheet-calc-wrap .thickBtn,
.pipe-calc-wrap .schBtn,
.flat-bar-calc-wrap .thickBtn {
    transition: all 0.15s ease-in-out;
}

.calc-wrap .thickBtn:hover,
.angle-calc-wrap .thickBtn:hover,
.sheet-calc-wrap .thickBtn:hover,
.pipe-calc-wrap .schBtn:hover,
.flat-bar-calc-wrap .thickBtn:hover {
    border-color: #e11d48;
    color: #e11d48;
}

/* ========================================================
   3. WEBGL 3D VIEWPORT CANVAS & CONTAINERS
   ======================================================== */
.angle-calc-wrap #angleWebgl,
.sheet-calc-wrap #sheetWebgl,
.pipe-calc-wrap #webgl,
.round-bar-calc-wrap #webgl-container,
.flat-bar-calc-wrap #webgl-container,
.flat-bar-calc-wrap #webgl-flat-container {
    cursor: grab; 
    background: transparent !important;
    touch-action: none;
    position: relative;
    z-index: 1;
    border-radius: 12px;
}

.angle-calc-wrap #angleWebgl:active,
.sheet-calc-wrap #sheetWebgl:active,
.pipe-calc-wrap #webgl:active,
.flat-bar-calc-wrap #webgl-flat-container:active,
.flat-bar-calc-wrap #webgl-container:active,
.round-bar-calc-wrap #webgl-container:active { 
    cursor: grabbing; 
}

/* 3D Viewport Red & White Radiant Ambient Glow Card */
.calc-viewport-glow-card {
    background: radial-gradient(circle at 50% 48%, rgba(225, 29, 72, 0.14) 0%, rgba(254, 226, 226, 0.45) 40%, rgba(255, 255, 255, 0.95) 75%), linear-gradient(135deg, #ffffff 0%, #fff1f2 50%, #ffffff 100%);
    border: 1.5px solid #fecdd3;
    border-radius: 16px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 30px -5px rgba(225, 29, 72, 0.08), inset 0 0 35px rgba(255, 241, 242, 0.6);
}

/* Ambient Radial Glow Blob behind 3D Mesh */
.calc-viewport-glow-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 180px;
    background: radial-gradient(ellipse at center, rgba(225, 29, 72, 0.18) 0%, rgba(225, 29, 72, 0.05) 55%, transparent 75%);
    filter: blur(15px);
    pointer-events: none;
    z-index: 0;
}

/* Viewport Header Badges */
.calc-viewport-badge {
    position: absolute;
    top: 12px;
    left: 16px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #be123c;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.calc-viewport-drag-hint {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #fecdd3;
    padding: 4px 10px;
    border-radius: 8px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.06);
    backdrop-filter: blur(4px);
}

/* ========================================================
   4. TOAST NOTIFICATIONS
   ======================================================== */
#angleCalcToast,
#sheetCalcToast,
#pipeCalcToast,
#flatCalcToast,
#roundCalcToast,
.calc-toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    border-left: 4px solid #e11d48;
}

#angleCalcToast.show,
#sheetCalcToast.show,
#pipeCalcToast.show,
#flatCalcToast.show,
#roundCalcToast.show,
.calc-toast-notification.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ========================================================
   5. COMPONENT WRAPPER & STATS CARDS
   ======================================================== */
.calc-card-outer {
    max-width: 1140px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

.calc-total-result-box {
    background-color: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.calc-stat-metric-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
}

.calc-rfq-action-container {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-rfq-primary-btn {
    width: 100%;
    background-color: #e11d48;
    color: #ffffff;
    font-weight: 700;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    box-shadow: 0 10px 20px rgba(225, 29, 72, 0.25);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.calc-rfq-primary-btn:hover {
    background-color: #be123c;
    transform: translateY(-1px);
}

.calc-spec-copy-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 640px) {
    .calc-spec-copy-box {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.calc-copy-pill-btn {
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.15s ease;
}

.calc-copy-pill-btn:hover {
    background: #1e293b;
}
