/* todo: common */
* {
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
}

body {
    font-size: 1.6rem;
    font-family: "Inter";
}

.container {
    width: 75vw;
    max-width: calc(100% - 48px);
    margin-left: auto;
    margin-right: auto;
}

input {
    border-radius: 8px;
    padding: 8px 12px;
    outline: none;
    border: 1px solid #777777;
    font-size: 1.8rem;
}

.btn {
    width: 100%;
    background-color: #000;
    color: #fff;
    padding: 8px 12px;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.5s;
}

.btn:hover {
    transform: translateY(-5px);
}

.swal2-popup {
    font-family: "Inter";
}

.swal2-title {
    font-size: 2.2rem;
    line-height: 1.4;
    font-weight: 600;
}

#swal2-html-container {
    font-size: 1.5rem;
}

.swal2-styled {
    font-size: 1.6rem;
    font-weight: 600;
}

div:where(.swal2-container) .swal2-html-container {
    font-size: 1.5rem;
}

/* todo:--------- Loading------------ */

#loading {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* todo: ===============header=================== */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.main {
    margin-top: 20px;
}

.main p {
    display: block;
    margin-top: 20px;
    text-align: center;
}


.form__serial-code {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    margin-top: 20px;
}

.input__container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.search-form__input {
    width: 50%;
    border: 2px solid #25aa3d;
    margin-top: 10px;
    padding: 18px 20px;
    border-radius: 15px;
    font-family: "Inter";
    font-size: 2.4rem;
    font-weight: 500;
    outline: none;
}

.search-form__input:focus {
    box-shadow: 0 0 3px 1px rgba(37, 170, 61, 0.75);
}

.search-form__input::placeholder {
    padding-left: 20px;
    color: #7c7c7cd0;
    font-family: "Inter";
    font-size: 2rem;
    font-weight: 500;
}

.btn__check {
    width: 25%;
    margin-top: 20px;
    padding: 12px 20px;
    text-align: center;
    font-size: 2.4rem;
    font-weight: 600;
    font-family: "Inter";
    color: #fff;
    background: #23ab3c;
    border-radius: 15px;
    border: 1px solid #23ab3c;
    text-decoration: none;
    cursor: pointer;
}


.result {
    display: none;
    width: 100%;
    padding: 0 20px 20px;
    margin: 20px auto;
    border: 1px dashed #23ab3c;
    font-family: "Inter";
    font-size: 1.8rem;
    font-weight: 500;
    border-radius: 10px;
}

.result p {
    text-align: left;
    display: block;
}

.result p:first-child {
    margin-top: 5px;
}

.result p:last-child {
    margin-bottom: -15px;
}

/* todo: =========== Table Success ==========*/
.result__success {
    display: none;
    border: 2px solid #ccc;
    margin: 20px auto;
    border-radius: 10px;
    width: 450px
}

tr:nth-child(even) {
    background-color: #f1f1f1;
}

th {
    font-weight: 600;
    width: 150px;
}

th, td {
    text-align: left;
    padding: 10px;
    line-height: 1.5;
    vertical-align: middle;
}

.success__message {
    color: #23ab3c;
    font-weight: 500;
}

.result__fail {
    margin-top: 20px;
    border: 1px dashed red;
}

.result__fail p {
    color: red;
}

/* todo: =============Modal Check=========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.6);
}

.modal__content {
    position: relative;;
    background-color: #fefefe;
    margin: 10% auto;
    padding: 10px 20px 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 360px;
}

.close {
    position: absolute;
    color: #aaa;
    font-size: 26px;
    font-weight: bold;
    top: 2px;
    right: 8px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.form__register h3 {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.form__register h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 1px;
    background-color: #ccc;
}

.form__register {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-top: 20px;
}

.warranty__item {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 3px;
}

.warranty__item label {
    font-size: 1.6rem;
    font-weight: 500;
}

.serialNumber,
.secretCode {
    background-color: #f1f1f1;
}

.btn__register {
    font-size: 1.8rem;
}   

/*!!  ----------------Responsive---------------- */

/* todo: PC 1400px --> 1590px */
@media screen and (min-width: 1400px) and (max-width: 1590px) {
    
}

/* todo: PC 1200px --> 1399px */
@media screen and (min-width: 1200px) and (max-width: 1399px) {
    .result__success {
        width: 400px;
    }

    th {
        width: 35%;
    }

    .modal__content {
        margin: 15% auto;
    }

}

/* todo: PC 992px --> 1199px */
@media screen and (min-width: 992px) and (max-width: 1199px) {
    .result__success {
        width: 400px;
    }

    th {
        width: 35%;
    }

    .modal__content {
        margin: 30% auto;
    }
}

/* todo: Tablet & Mobile */
@media screen and (max-width: 991px) {
    .result__success {
        width: 400px;
    }

    th {
        width: 35%;
    }
}

/* todo: Tablet */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .container {
        width: 100vw;
        max-width: calc(100% - 24px);
        margin-left: auto;
        margin-right: auto;
    }

    .search-form__input,
    .btn__check {
        font-size: 1.8rem;       
    }

    .search-form__input {
        padding: 12px 16px;
    }

    .btn__check {
        padding: 8px 12px;
    }

    .modal__content {
        margin: 30% auto;
    }
}

/* todo: Mobile */
@media screen and (max-width: 767px) {
    .container {
        width: 100vw;
        max-width: calc(100% - 24px);
        margin-left: auto;
        margin-right: auto;
    }

    .input__container {
        flex-direction: column;
        gap: 10px;
    }

    .search-form__input {
        width: 100%;
    }

    .search-form__input,
    .btn__check {
        font-size: 1.6rem;       
    }

    .search-form__input {
        padding: 10px 12px;
    }

    .btn__check {
        width: 100px;
        padding: 6px 10px;
        margin-top: 10px;
    }

    .result__success {
        width: 350px;       
    }

    .modal__content {
        margin: 50% auto;
    }
}