/* Customer dashboard: "I miei droni" preview card + list table. */

.dflight-drones-preview {
    box-sizing: border-box;
    padding: 16px 20px;
    margin: 0 0 30px 0;
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-left: 4px solid #1979c3;
    border-radius: 6px;
}

.dflight-drones-preview__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dflight-drones-preview__title {
    font-size: 16px;
    font-weight: 700;
    color: #303030;
}

.dflight-drones-preview__all {
    font-size: 13px;
    color: #1979c3;
    text-decoration: none;
}

.dflight-drones-preview__all:hover {
    text-decoration: underline;
}

.dflight-drones-preview__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 600px) {
    .dflight-drones-preview__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.dflight-drones-preview__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 14px;
    background: #ffffff;
    border: 1px solid #d6e5f5;
    border-radius: 8px;
    min-width: 0;
    text-align: center;
}

/* QR: framed thumbnail on top of the card. */
.dflight-drones-preview__qr {
    margin: 0;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #e6e9f0;
    border-radius: 8px;
    line-height: 0;
    box-shadow: 0 1px 2px rgba(17, 24, 43, 0.06);
}

.dflight-drones-preview__qr-img {
    display: block;
    width: 96px;
    height: 96px;
}

.dflight-drones-preview__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.dflight-drones-preview__name {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    word-break: break-word;
}

/* Drone code as a compact pill chip. */
.dflight-drones-preview__code {
    display: inline-block;
    max-width: 100%;
    padding: 1px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #3b6fb0;
    background: #eef4fc;
    border-radius: 999px;
    word-break: break-word;
}

/* Licence status badge: green dot when licensed, grey when not. */
.dflight-drones-preview__license {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    border-radius: 999px;
}

.dflight-drones-preview__license-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.dflight-drones-preview__license--ok {
    color: #1a7f37;
    background: #e7f6ec;
}

.dflight-drones-preview__license--muted {
    color: #6b7280;
    background: #f0f1f3;
}

/* Contextual CTA ("Acquista QR-Code" / "Upgrade licenza") on the drone card. */
.dflight-drones-preview__cta {
    font-size: 12px;
    font-weight: 600;
    color: #1979c3;
    text-decoration: none;
}

.dflight-drones-preview__cta:hover {
    text-decoration: underline;
}

/* Full list page. */
.dflight-drones-list__title {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
    color: #303030;
}

.dflight-drones-list__empty {
    margin: 12px 0;
    padding: 14px 18px;
    background: #f7faff;
    border: 1px solid #d6e5f5;
    border-radius: 4px;
    color: #1a3a6c;
    font-size: 14px;
}

.dflight-drones-list__table {
    width: 100%;
    border-collapse: collapse;
}

.dflight-drones-list__table thead th {
    background: #f5f5f5;
    color: #303030;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e3e3e3;
    font-weight: 600;
}

.dflight-drones-list__table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #ececec;
    color: #303030;
    vertical-align: top;
    word-break: break-word;
}

.dflight-drones-list__table tbody tr:hover {
    background: #fafcff;
}

/* PDP drone selector — Luma-aligned styling, sits above the Add-to-Cart
   button and matches the customer fiscal-profile widget tone. */

/* No custom UI for the select area: just a bottom margin to separate the
   native label+select from the Add-to-Cart button. */
.dflight-drone-selector {
    margin: 0 0 20px 0;
}

.dflight-drone-selector__label {
    display: block;
    margin: 0 0 8px 0;
    color: #303030;
    font-weight: 600;
    font-size: 14px;
}

.dflight-drone-selector__label .required {
    color: #e02b27;
    margin-left: 2px;
}

.dflight-drone-selector__error {
    margin-top: 6px;
    color: #e02b27;
    font-size: 13px;
    line-height: 1.4;
}

/* PDP notice variant — guest / no-drones alert above add-to-cart. */
.dflight-drone-selector--notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 16px;
    padding: 12px 16px;
    background: #fff7e6;
    border: 1px solid #f0c987;
    border-left: 4px solid #e8a838;
    border-radius: 6px;
    color: #6b4e16;
}

.dflight-drone-selector--notice .dflight-drone-selector__icon::before {
    content: "!";
    display: flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    background: #e8a838;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    line-height: 1;
}

.dflight-drone-selector--notice p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

.dflight-drone-selector--notice a {
    margin-left: 4px;
    font-weight: 600;
    text-decoration: underline;
}

/* Add-to-Cart disabled while no drone is available / selected. */
.dflight-tocart-disabled,
button.tocart.dflight-tocart-disabled,
#product-addtocart-button.dflight-tocart-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
