/* ========= Adorable Result Manager – Front-end Styles (v1.0.3) ========= */

/* Form layout (mobile-first) */
.arm-form {
    margin: 20px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: end;
}

.arm-field {
    position: relative;
    padding-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.arm-actions {
    display: flex;
    gap: 8px;
    align-items: stretch;
    align-self: end;
}

/* Inputs & Selects — same rounded look */
.arm-form .arm-input,
.arm-form .arm-select {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 46px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    line-height: 1.2;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
    vertical-align: middle;
}

.arm-form .arm-input:hover,
.arm-form .arm-select:hover {
    border-color: #94a3b8;
}

.arm-form .arm-input:focus,
.arm-form .arm-input:focus-visible,
.arm-form .arm-select:focus,
.arm-form .arm-select:focus-visible {
    outline: 0;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

/* Required but empty → no red yet */
.arm-form .arm-input:required:invalid {
    border-color: #cbd5e1;
    box-shadow: none;
}

.arm-form .arm-input:required:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

/* Select chevron (native) */
.arm-form .arm-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Helper text */
.arm-hint {
    position: absolute;
    left: 0;
    bottom: 0;
    font-size: 12px;
    color: #6b7280;
}

/* Buttons */
.arm-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s ease;
}

.arm-btn--primary {
    background: #0119a3;
    color: #fff;
}

.arm-btn--primary:hover {
    background: #011584;
}

/* Responsive breakpoints */
@media (min-width:480px) {
    .arm-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width:768px) {
    .arm-form {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (min-width:1024px) {
    .arm-form {
        grid-template-columns: 1fr 1fr 1fr auto;
        gap: 12px;
    }
}

/* Result card – no horizontal scroll on mobile */
.arm-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .04);
}

.arm-card h2 {
    text-align: center;
    margin: 0 0 6px;
    font-weight: 700;
}

.arm-card h3 {
    text-align: center;
    color: #444;
    font-weight: 600;
    margin: 0 0 16px;
}

.arm-table-wrap {
    overflow-x: hidden;
}


.arm-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    
}

.arm-table th,
.arm-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
}

.arm-table th {
    background: #f8fafc;
    text-align: left;
    width: 38%;
}

/* Mobile tuning for the DMC card */
@media (max-width:640px) {
    .arm-card {
        padding: 12px;
    }

    .arm-card h2 {
        font-size: 18px;
    }

    .arm-card h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .arm-table th,
    .arm-table td {
        padding: 8px 10px;
        font-size: 14px;
    }

    .arm-table th {
        width: 42%;
    }

}

/* Alerts */
.arm-alert {
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 12px;
}

/* Optional dark mode */
@media (prefers-color-scheme: dark) {

    .arm-form .arm-input,
    .arm-form .arm-select {
        border-color: #334155;
        color: #e5e7eb;
    }

    .arm-form .arm-select {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    }
}
/* --- Search button alignment fixes --- */
/* Desktop (≥1024px): بٹن کو لیبل کے نیچے ان پٹس والی لائن میں لائیں */
@media (min-width:1024px){
  .arm-actions{
    grid-column: auto;
    align-self: start;          /* grid item اوپر سے شروع */
    padding-top: 32px;          /* لیبل + gap کے برابر اوپر اسپیس تاکہ بٹن ان پٹ لائن میں آئے */
  }
  .arm-actions .arm-btn{
    height:46px;                /* ان پٹ جتنی ہائٹ */
    line-height:46px;           /* ٹیکسٹ عمودی طور پر سینٹر */
    padding:0 18px;
    display:inline-flex; align-items:center; justify-content:center;
    border-radius:12px;
  }
}

/* Tablet (768–1023px): یہی منطق */
@media (min-width:768px) and (max-width:1023.98px){
  .arm-actions{
    align-self:start;
    padding-top: 32px;
  }
  .arm-actions .arm-btn{
    height:46px; line-height:46px; border-radius:12px;
  }
}

/* Mobile (≤767px): بٹن فل وِڈتھ اور اپنی قطار میں */
@media (max-width:767.98px){
  .arm-actions{ grid-column:1 / -1; }
  .arm-actions .arm-btn{ width:100%; height:46px; border-radius:12px; }
}