/* =========================================================
   Cải tiến giao diện cho Plugin Lab Warranty (v2 - Không Bootstrap)
   Màu chủ đạo: Pink-Red (#E35D75), Dark Gray (#6E6E6E), Light Gray (#D9D9D9)
   ========================================================= */

:root {
    --lw-primary: #E35D75;
    --lw-primary-hover: #C54D66;
    --lw-dark: #6E6E6E;
    --lw-light: #D9D9D9;
    --lw-success: #388E3C;
    --lw-danger: #D32F2F;
}

.lw-wrap {
    font-family: 'Roboto', sans-serif;
    color: var(--lw-dark);
    line-height: 1.6;
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px; /* Tăng bo tròn */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Đổ bóng mạnh hơn */
}

/* Form tra cứu */
.lw-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px 20px;
    background-color: #f8f9fa; /* Nền nhẹ cho form */
    border: 1px solid var(--lw-light);
    border-radius: 8px;
}

.lw-form label {
    font-weight: 600;
    color: var(--lw-dark);
    font-size: 15px;
    white-space: nowrap;
}

.lw-form input#code {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--lw-light);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lw-form input#code:focus {
    border-color: var(--lw-primary);
    box-shadow: 0 0 0 3px rgba(227, 93, 117, 0.3);
    outline: none;
}

.lw-btn {
    background-color: var(--lw-primary);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.lw-btn:hover {
    background-color: var(--lw-primary-hover);
}

/* Bảng kết quả */
.warranty-result {
    margin-top: 20px;
}

.warranty-card {
    background-color: #fff;
    border: 1px solid var(--lw-light);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.warranty-card__header {
    background-color: var(--lw-primary);
    color: #fff;
    font-weight: 700;
    text-align: center;
    padding: 12px 0;
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
    font-size: 18px;
    margin-bottom: 0;
    text-transform: uppercase;
}

.warranty-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.warranty-table tr:nth-child(even) {
    background-color: #f8f9fa; /* Màu nền xen kẽ */
}

.warranty-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    font-size: 15px;
}

.warranty-table tr:last-child td {
    border-bottom: none;
}

.warranty-table td.k {
    width: 35%;
    font-weight: 600;
    color: var(--lw-dark);
}

.warranty-table td.v {
    color: #333333;
}

.lw-empty {
    text-align: center;
    color: #856404;
    font-style: italic;
    margin-top: 20px;
    font-size: 15px;
    padding: 12px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
}

/* Trạng thái bảo hành */
.warranty-status-expired {
    font-weight: 700;
    color: var(--lw-danger);
    background-color: #FFEBEE;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}

.warranty-status-active {
    font-weight: 700;
    color: var(--lw-success);
    background-color: #E8F5E9;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}

/* Responsive (Sửa lỗi hiển thị trên mobile) */
@media (max-width: 768px) {
    .lw-form {
        flex-wrap: wrap;
        justify-content: center;
    }
    .lw-form label {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    .lw-form input#code {
        min-width: unset;
        width: calc(100% - 100px); /* Để lại chỗ cho nút */
    }
    .lw-btn {
        width: auto;
        flex-grow: 0;
    }
    
    /* Sửa lỗi bảng trên mobile */
    .warranty-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 0.5rem 1rem; /* Giảm padding */
    }
    .warranty-table td.k {
        font-weight: bold;
        background-color: #f0f0f0;
        padding-top: 1rem;
        padding-bottom: 0.25rem;
        width: 100%; /* Đảm bảo chiếm hết chiều rộng */
    }
    .warranty-table td.v {
        padding-top: 0.25rem;
        padding-bottom: 1rem;
    }
    .warranty-table tr {
        margin-bottom: 10px;
        display: block;
        border: 1px solid var(--lw-light);
        border-radius: 8px;
        overflow: hidden;
    }
    .warranty-table tr:nth-child(even) {
        background-color: #fff; /* Loại bỏ nền xen kẽ trên mobile */
    }
    .warranty-table tr:nth-child(odd) {
        background-color: #fff;
    }
    .warranty-card__header {
        font-size: 16px;
    }
    .lw-wrap {
        padding: 15px;
    }
}
