/* Reset and Box Sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
}

/* Body */
body {
    font-family: Arial, sans-serif;
}


/* Container */
.container {
    width: 100%;
    max-width: 1340px;
    padding: 10px;
    padding-top: 50px;
    margin-right: auto;
    margin-left: auto;
}


/* Content */
.content {
    display: flex;
    flex-wrap: wrap;
}

.inputsection {
    flex: 0 0 66.66667%;
    max-width: 66.66667%;
    border: 1px solid rgb(222, 226, 230);
    padding: 15px;
    border-radius: 0.25rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}


/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    padding: 1.755rem 3rem;
    background-color: #ebedf0;
}

.navbar>img {
    width: 50px;
    height: auto;
}

.navbar>a {
    color: #000;
    text-decoration: none;
    padding-left: 15px;
    display: flex;
}

.nav-link > div{
    font-size: 22px;
    font-weight: 600; 
}

/* Form Styles */
#qrForm {
    padding: 15px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.form-check {
    display: flex;
    align-items: center;
}

input[type="checkbox"] {
    margin-right: 0.5rem;
    display: flex;
    justify-content: center;
}

.form-submit {
    display: flex;
    justify-content: center;
    margin-top: 35px;
}

#url-input{
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    font-size: 20px;
    color: #fff;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 10px 20px;
    border-radius: 0.25rem;
    background-color: #007bff;
}

.btn:hover {
    background-color: #0056b3;
}

#download-links-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

#download-links-container .btn {
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
}

#download-links-container .btn:disabled,
#download-links-container .btn.disabled {
    opacity: 0.65;
    pointer-events: none;
    cursor: not-allowed;
}

/* Responsive for download buttons */
@media (min-width: 768px) {
    #download-links-container {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    #download-links-container .btn {
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(33.333% - 6px);
        margin: 0;
        font-size: 14px;
        padding: 8px 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

#download-link {
    width: 100%;
    justify-content: center;
}

#download-link > div{
    font-weight: 400;
    font-size: 20px;
    /* padding: 7px 10px; */
}

.disabled {
    opacity: 0.65;
    pointer-events: none;
}

/* Output Section */
.outputsection {
    flex: 0 0 33.33333%;
    max-width: 33.33333%;
    border: 1px solid rgb(222, 226, 230);
    border-left: none;
    border-radius: 0.25rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.shortlinkcontainer {
    margin-top: 15px;
    text-align: center; 
    word-break: break-all;
}

h3 {
    padding: 20px;
    text-align: center;
    font-size: 25px;
}

#qrImage {
    min-height: 250px; /*Sesuai ukuran Qr-code  */
    max-width: 100%;
    height: auto;
    width: 250px;
    opacity: 1;
}

/* Flex Utility Classes */
.outputsection>div {
    display: flex;
    justify-content: center;
    padding: 30px;
}

#short-link-container{
    text-align: center;
    min-height: 58.4px;
}

.link-container{
    height: auto;
    flex-direction: column;
    margin-bottom: 30px;
}
/* Footer */
footer {
    background-color: #ebedf0;
    text-align: center;
    bottom: 0;
    position: absolute;
    width: 100%;
}

footer div {
    padding: 1rem;
}

.text-body {
    text-decoration: none;
    color: black;
}



/* for Responsive */

/* Laptop View */
@media (max-width: 992px) {
    .inputsection {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .outputsection {
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 20px;
    }
}

/* Mobile View */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        text-align: center;
    }

    .navbar>img {
        margin-bottom: 10px;
    }

    .content {
        flex-direction: column;
    }

    .inputsection,
    .outputsection {
        max-width: 100%;
        flex: 0 0 100%;
    }

    h3 {
        font-size: 20px;
    }

    #qrImage {
        width: 200px;
    }

    .btn {
        font-size: 18px;
    }
    
    #download-links-container {
        flex-direction: column;
        gap: 8px;
    }
    
    #download-links-container .btn {
        width: 100%;
        max-width: none;
        margin: 0;
    }
}

/* Small Mobile View */
@media (max-width: 576px) {
    #qrImage {
        width: 150px;
    }

    .btn {
        font-size: 16px;
        padding: 8px 15px;
    }
    
    #download-links-container .btn {
        font-size: 14px;
        padding: 8px 10px;
    }
}

/* Medium screens - tablet landscape */
@media (min-width: 768px) and (max-width: 1024px) {
    #download-links-container .btn {
        font-size: 13px;
        padding: 8px 10px;
        max-width: calc(33.333% - 5px);
    }
}


/* Container semua logo */
.logo-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.logo-option {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 60px;
    height: 60px;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    margin: 0;
    box-sizing: border-box;
}

.logo-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.logo-option img {
    width: 32px !important;
    height: 32px !important;
    display: block !important;
    object-fit: contain;
    transition: transform 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none;
    line-height: 0;
}

/* Efek hover pada kotak */
.logo-option:hover {
    border-color: #007BFF;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

/* Efek hover pada icon di dalam kotak */
.logo-option:hover img {
    transform: scale(1.2);
}

/* Efek ketika radio dipilih */
.logo-option input[type="radio"]:checked+img {
    transform: scale(1.2);
    filter: drop-shadow(0 0 4px #007BFF);
}

.logo-option:has(input[type="radio"]:checked) {
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.7);
}