/* Agram Geda Lift Scaffold Calculator - Scoped Styles */

.agram-scaffold-calc-wrapper {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #171717;
    color: #ffffff;
    padding: 48px 24px;
    border-radius: 20px;
    margin: 40px auto;
    max-width: 1280px;
}

.agram-scaffold-calc-wrapper * {
    box-sizing: border-box;
}

.agram-calc-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.agram-calc-header {
    max-width: 760px;
    margin-bottom: 40px;
}

.agram-calc-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a3a3a3;
    margin-bottom: 8px;
}

.agram-red-badge {
    color: #ef4444;
}

.agram-separator {
    color: #525252;
}

.agram-calc-title {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin: 0 0 12px 0;
}

@media (min-width: 768px) {
    .agram-calc-title {
        font-size: 38px;
    }
}

.agram-calc-subtitle {
    font-size: 15px;
    line-height: 1.6;
    color: #a3a3a3;
    margin: 0;
}

/* Grid Layout */
.agram-calc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}

@media (min-width: 992px) {
    .agram-calc-grid {
        grid-template-columns: 5fr 7fr;
    }
}

/* Cards */
.agram-calc-card {
    background-color: rgba(38, 38, 38, 0.85);
    border: 1px solid rgba(64, 64, 64, 0.8);
    border-radius: 16px;
    padding: 28px;
}

.agram-calc-results {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
}

.agram-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 14px;
    border-bottom: 1px solid #404040;
    margin-bottom: 24px;
}

.agram-card-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.agram-header-note {
    font-size: 12px;
    color: #a3a3a3;
}

/* Form Groups */
.agram-form-group {
    margin-bottom: 22px;
}

.agram-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.agram-label-row label,
.agram-label {
    font-size: 13px;
    font-weight: 600;
    color: #d4d4d4;
    margin: 0;
    display: block;
}

.agram-val {
    font-size: 15px;
    font-weight: 700;
    font-family: monospace;
    color: #f87171;
}

/* Sliders */
.agram-range {
    width: 100%;
    height: 8px;
    border-radius: 6px;
    background: #404040;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    margin: 6px 0;
}

.agram-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc2626;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.agram-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc2626;
    cursor: pointer;
    border: 2px solid #ffffff;
}

.agram-range-hints {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #737373;
    font-family: monospace;
}

/* System choice buttons */
.agram-sys-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.agram-sys-btn {
    text-align: left;
    padding: 12px;
    background: rgba(23, 23, 23, 0.6);
    border: 1px solid #404040;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.agram-sys-btn strong {
    font-size: 13px;
    color: #a3a3a3;
    display: block;
}

.agram-sys-btn span {
    font-size: 11px;
    color: #737373;
    margin-top: 3px;
    display: block;
}

.agram-sys-btn.active {
    background: rgba(220, 38, 38, 0.15);
    border-color: #ef4444;
}

.agram-sys-btn.active strong {
    color: #ffffff;
}

.agram-sys-btn.active span {
    color: #fca5a5;
}

/* Checkbox rows */
.agram-options-group {
    border-top: 1px solid #333333;
    padding-top: 18px;
}

.agram-checkbox-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(23, 23, 23, 0.6);
    border: 1px solid #333333;
    border-radius: 10px;
    margin-top: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #d4d4d4;
    transition: border-color 0.2s;
}

.agram-checkbox-row:hover {
    border-color: #525252;
}

.agram-checkbox-row input {
    width: 16px;
    height: 16px;
    accent-color: #dc2626;
    cursor: pointer;
}

/* Results Card Styles */
.agram-results-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #404040;
}

@media (min-width: 600px) {
    .agram-results-summary {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.agram-res-kicker {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a3a3a3;
    display: block;
}

.agram-res-area {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 4px;
}

.agram-res-area span {
    color: #f87171;
    font-family: monospace;
}

.agram-res-stats {
    display: flex;
    gap: 20px;
    font-size: 12px;
    font-family: monospace;
}

.agram-res-stats .stat-lbl {
    color: #737373;
    display: block;
}

.agram-res-stats strong {
    color: #ffffff;
    font-size: 13px;
}

/* Spec list */
.agram-spec-list {
    margin-top: 24px;
}

.agram-spec-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a3a3a3;
    margin-bottom: 12px;
}

.agram-spec-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 600px) {
    .agram-spec-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.agram-spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(23, 23, 23, 0.7);
    border: 1px solid rgba(64, 64, 64, 0.5);
    border-radius: 8px;
    font-size: 12px;
}

.agram-spec-item .item-name {
    color: #d4d4d4;
    font-weight: 500;
}

.agram-spec-item .item-qty {
    font-family: monospace;
    font-weight: 700;
    font-size: 13px;
    color: #f87171;
    margin-left: 8px;
    white-space: nowrap;
}

.agram-disclaimer {
    font-size: 11px;
    font-style: italic;
    color: #737373;
    margin: 16px 0 0 0;
    line-height: 1.5;
}

/* Action button */
.agram-action-row {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #404040;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 600px) {
    .agram-action-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.agram-action-text {
    font-size: 12px;
    color: #a3a3a3;
}

.agram-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #dc2626;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
    white-space: nowrap;
}

.agram-btn-primary:hover {
    background: #b91c1c;
}

/* Modal styles */
.agram-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.agram-modal-box {
    background: #ffffff;
    color: #171717;
    border-radius: 16px;
    max-width: 580px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    animation: agramFadeIn 0.2s ease;
}

@keyframes agramFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.agram-modal-header {
    background: #171717;
    color: #ffffff;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agram-modal-header h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
}

.agram-modal-close {
    background: transparent;
    border: none;
    color: #a3a3a3;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.agram-modal-close:hover {
    color: #ffffff;
}

.agram-modal-body {
    padding: 24px;
}

.agram-quote-summary-badge {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.agram-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

@media (min-width: 480px) {
    .agram-form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.agram-col,
.agram-form-col {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

.agram-col label,
.agram-form-col label {
    font-size: 12px;
    font-weight: 600;
    color: #404040;
    margin-bottom: 6px;
}

.agram-col input,
.agram-form-col textarea {
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
}

.agram-col input:focus,
.agram-form-col textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.agram-modal-actions {
    margin-top: 10px;
}

.agram-btn-submit {
    width: 100%;
    padding: 14px;
    background: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.agram-btn-submit:hover {
    background: #b91c1c;
}

.agram-modal-box.agram-modal-wide {
    max-width: 960px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.agram-modal-subheading {
    font-size: 12px;
    color: #a3a3a3;
    margin-top: 2px;
}

.agram-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.agram-modal-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 820px) {
    .agram-modal-content-grid {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: start;
    }
}

.agram-modal-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #525252;
    margin-bottom: 12px;
}

.agram-badge-count {
    font-family: monospace;
    font-size: 11px;
    color: #ef4444;
    background: #fef2f2;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
}

/* Scrollable items list */
.agram-modal-items-scroll {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agram-modal-items-scroll::-webkit-scrollbar {
    width: 6px;
}

.agram-modal-items-scroll::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 4px;
}

/* Individual Item Card */
.agram-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color 0.15s;
}

.agram-modal-item:hover {
    border-color: #cbd5e1;
}

.agram-modal-item-img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.agram-modal-item-noimg {
    width: 54px;
    height: 54px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.agram-modal-item-info {
    flex: 1;
    min-width: 0;
}

.agram-modal-item-sys {
    font-size: 10px;
    font-weight: 800;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agram-modal-item-title {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agram-modal-item-meta {
    font-size: 11px;
    color: #64748b;
    font-family: monospace;
    margin-top: 2px;
}

/* Controls */
.agram-modal-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.agram-stepper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 2px;
}

.agram-step-btn {
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.15s;
}

.agram-step-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.agram-step-val {
    width: 34px;
    text-align: center;
    font-family: monospace;
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
}

.agram-btn-remove {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
}

.agram-btn-remove:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Form column */
.agram-modal-form-col {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
}

.agram-modal-trust {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    margin-top: 12px;
    line-height: 1.4;
}

.agram-feedback {
    margin-top: 14px;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

.agram-feedback.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.agram-feedback.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

