/*
(C) prepphint.com all right reserved.
*/
.custom-upload-container {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border: 2px dashed #ccc;
        border-radius: 10px;
        width: 100%;
        height: 500px;
        background-color: #fff;
        overflow: hidden;
        margin-top: 15px;
    }

.custom-upload-container.dragover {
        border-color: #007bff;
        background-color: #f0f7ff;
    }

    .custom-upload-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 20px;
        width: 100%;
    }

    .custom-upload-icon {
        width: 100px;
        margin-bottom: 10px;
    }

    .custom-preview-container {
        display: none;
        flex-wrap: wrap;
        justify-content: center;
        overflow-y: auto;
        width: 100%;
        padding: 10px;
    }

    .custom-preview-image {
        position: relative;
        width: 100px;
        height: 100px;
        object-fit: cover;
        margin: 5px;
        border: 1px solid #ccc;
        border-radius: 5px;
        cursor: move;
    }

    .remove-button {
        position: absolute;
        top: 5px;
        right: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        width: 24px;
        height: 24px;
    }

    .remove-button svg {
        width: 24px;
        height: 24px;
        fill: red;
    }

    .custom-browse-button {
        background-color: #007bff;
        color: white;
        border: none;
        padding: 10px 20px;
        cursor: pointer;
        border-radius: 5px;
        font-size: 16px;
        margin-top: 10px;
    }

    .custom-browse-button:hover {
        background-color: #0056b3;
    }

    input[type="file"] {
        display: none;
    }

    .custom-button-container {
        margin-top: 20px;
        display: flex;
        gap: 10px;
    }

    .custom-convert-button {
        background-color: #007bff;
        color: white;
        border: none;
        padding: 10px 20px;
        cursor: pointer;
        border-radius: 5px;
        font-size: 16px;
        font-weight: bold;
    }

    .custom-convert-button:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }

    .custom-convert-button:hover:enabled {
        background-color: #0056b3;
    }

    .custom-download-button {
        background-color: #d9d9d9;
        color: black;
        border: none;
        padding: 10px 20px;
        cursor: pointer;
        border-radius: 5px;
        font-size: 16px;
        font-weight: bold;
        text-decoration: none;
    }

    .custom-download-button:hover:enabled {
        background-color: #b3b3b3;
    }

    .spinner-overlay {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.5);
        z-index: 10;
        justify-content: center;
        align-items: center;
    }

    .spinner {
        border: 16px solid #f3f3f3;
        border-top: 16px solid #007bff;
        border-radius: 50%;
        width: 120px;
        height: 120px;
        animation: spin 2s linear infinite;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    .error-message {
        color: red;
        margin-top: 10px;
    }
/* Tablets landscape (768px - 991px) */
@media screen and (max-width: 991px) {
    .custom-upload-container {
        height: 400px;
    }
    .custom-upload-icon {
        width: 80px;
    }
    .custom-preview-image {
        width: 90px;
        height: 90px;
    }
    .custom-browse-button,
    .custom-convert-button,
    .custom-download-button {
        font-size: 15px;
        padding: 9px 18px;
    }
    .spinner {
        width: 100px;
        height: 100px;
        border-width: 14px;
    }
}

/* Tablets portrait / large phones (576px - 767px) */
@media screen and (max-width: 767px) {
    .custom-upload-container {
        height: 350px;
    }
    .custom-upload-icon {
        width: 70px;
    }
    .custom-preview-image {
        width: 80px;
        height: 80px;
    }
    .custom-browse-button,
    .custom-convert-button,
    .custom-download-button {
        font-size: 14px;
        padding: 8px 16px;
    }
    .custom-button-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    .spinner {
        width: 90px;
        height: 90px;
        border-width: 12px;
    }
    #upload-text {
        font-size: 14px;
    }
}

/* Small phones (401px - 575px) */
@media screen and (max-width: 575px) {
    .custom-upload-container {
        height: 300px;
        border-radius: 8px;
    }
    .custom-upload-icon {
        width: 60px;
        margin-bottom: 8px;
    }
    .custom-preview-image {
        width: 70px;
        height: 70px;
        margin: 4px;
    }
    .custom-browse-button {
        font-size: 13px;
        padding: 8px 14px;
    }
    .custom-convert-button,
    .custom-download-button {
        font-size: 13px;
        padding: 8px 14px;
    }
    .custom-button-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-top: 15px;
    }
    .spinner {
        width: 70px;
        height: 70px;
        border-width: 10px;
    }
    #upload-text {
        font-size: 13px;
        padding: 0 10px;
    }
    .custom-preview-container {
        padding: 5px;
    }
    .custom-upload-area {
        padding: 15px;
    }
}

/* Extra small phones (320px - 400px) */
@media screen and (max-width: 400px) {
    .custom-upload-container {
        height: 260px;
        border-radius: 6px;
        margin-top: 10px;
    }
    .custom-upload-icon {
        width: 50px;
        margin-bottom: 5px;
    }
    .custom-preview-image {
        width: 55px;
        height: 55px;
        margin: 3px;
        border-radius: 4px;
    }
    .custom-browse-button {
        font-size: 12px;
        padding: 7px 12px;
        margin-top: 6px;
    }
    .custom-convert-button,
    .custom-download-button {
        font-size: 12px;
        padding: 7px 12px;
        width: 100%;
        text-align: center;
    }
    .custom-button-container {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin-top: 12px;
        width: 100%;
    }
    .spinner {
        width: 55px;
        height: 55px;
        border-width: 8px;
    }
    #upload-text {
        font-size: 12px;
        padding: 0 8px;
    }
    .custom-preview-container {
        padding: 4px;
    }
    .remove-button {
        width: 20px;
        height: 20px;
        top: 2px;
        right: 2px;
    }
    .remove-button svg {
        width: 20px;
        height: 20px;
    }
    .custom-upload-area {
        padding: 10px;
    }
}

/* Very small screens (below 320px) */
@media screen and (max-width: 319px) {
    .custom-upload-container {
        height: 220px;
        border-radius: 5px;
    }
    .custom-upload-icon {
        width: 40px;
        margin-bottom: 4px;
    }
    .custom-preview-image {
        width: 45px;
        height: 45px;
        margin: 2px;
        border-radius: 3px;
    }
    .custom-browse-button {
        font-size: 11px;
        padding: 6px 10px;
        margin-top: 5px;
    }
    .custom-convert-button,
    .custom-download-button {
        font-size: 11px;
        padding: 6px 10px;
        width: 100%;
        text-align: center;
    }
    .custom-button-container {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        margin-top: 10px;
        width: 100%;
    }
    .spinner {
        width: 45px;
        height: 45px;
        border-width: 6px;
    }
    #upload-text {
        font-size: 11px;
        padding: 0 5px;
    }
    .custom-preview-container {
        padding: 3px;
    }
    .remove-button {
        width: 18px;
        height: 18px;
        top: 1px;
        right: 1px;
    }
    .remove-button svg {
        width: 18px;
        height: 18px;
    }
    .custom-upload-area {
        padding: 8px;
    }
}
