
.aepg-finishing-calculator {
    max-width: 900px;
    margin: 40px auto;
    padding: 24px 22px;
    border-radius: 20px;
    position: relative;
    background: radial-gradient(circle at top left, #1d4ed8 0, #0f172a 40%, #020617 100%);
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    direction: rtl;
    text-align: right;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.75);
}

/* subtle glow border */
.aepg-finishing-calculator::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 22px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(96,165,250,0.7), rgba(16,185,129,0.6));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.aepg-title {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 800;
    color: #f9fafb;
}

.aepg-subtitle {
    margin: 0 0 24px;
    font-size: 13px;
    color: #9ca3af;
}

/* FORM GRID */
.aepg-finishing-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    margin-bottom: 10px;
}

.aepg-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.aepg-row small {
    font-size: 11px;
    color: #9ca3af;
}

.aepg-row label {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
}

/* inputs */
.aepg-row input[type="text"],
.aepg-row input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    height: 44px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.75) !important;
    background-color: rgba(15, 23, 42, 0.9) !important;
    color: #f9fafb !important;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.05s ease;
}

.aepg-row input::placeholder {
    color: #6b7280;
}

.aepg-row input[type="text"]:focus,
.aepg-row input[type="number"]:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
    background-color: rgba(15, 23, 42, 1) !important;
    transform: translateY(-0.5px);
}

/* FIELDSET FOR EXTRAS */
.aepg-fieldset {
    grid-column: 1 / -1;
    border-radius: 16px;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    padding: 12px 14px 10px;
    margin: 0;
    background: rgba(15, 23, 42, 0.8);
}

.aepg-fieldset legend {
    font-size: 13px;
    font-weight: 600;
    padding: 0 6px;
    color: #e5e7eb;
}

.aepg-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 4px;
    color: #e5e7eb;
}

.aepg-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #22c55e;
}

/* RADIO GROUP FOR FINISH LEVEL */
.aepg-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aepg-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background-color: rgba(15, 23, 42, 0.8);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
}

.aepg-radio input[type="radio"] {
    width: 14px;
    height: 14px;
    accent-color: #3b82f6;
}

.aepg-radio span {
    color: #e5e7eb;
}

.aepg-radio:hover {
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
    transform: translateY(-0.5px);
}

/* BUTTONS */
.aepg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
    white-space: nowrap;
}

.aepg-btn-calc {
    grid-column: 1 / -1;
    justify-self: flex-start;
    background: linear-gradient(135deg, #3b82f6, #22c55e);
    color: #f9fafb;
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.5);
}

.aepg-btn-calc:hover {
    box-shadow: 0 18px 40px rgba(59, 130, 246, 0.6);
    transform: translateY(-1px);
}

.aepg-btn-pdf {
    background: linear-gradient(135deg, #22c55e, #14b8a6);
    color: #f9fafb;
    margin-top: 8px;
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.5);
}

.aepg-btn-pdf:hover {
    box-shadow: 0 18px 40px rgba(34, 197, 94, 0.7);
    transform: translateY(-1px);
}

.aepg-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* RESULT BOX */
.aepg-result {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(55, 65, 81, 0.9);
}

.aepg-result h4 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #e5e7eb;
}

.aepg-result-summary {
    font-weight: 700;
    color: #fef3c7;
    margin-bottom: 6px;
}

.aepg-result-details {
    margin: 0 0 8px;
    padding-right: 18px;
    font-size: 13px;
    color: #e5e7eb;
}

.aepg-result-details li {
    margin-bottom: 3px;
}

.aepg-note {
    font-size: 11px;
    color: #9ca3af;
    margin: 4px 0 0;
}

/* name note can be a bit stronger if needed */
.aepg-name-note {
    color: #facc15;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .aepg-finishing-calculator {
        padding: 18px 14px;
        border-radius: 18px;
    }

    .aepg-finishing-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .aepg-btn-calc {
        justify-self: stretch;
        text-align: center;
    }
}
