/* ==========================================================================
   Auto Gallery Upload – Widget Styles (Default / Fallback)
   These base values are overridden by Elementor's inline styles when the
   user customises controls in the editor.
   ========================================================================== */

/* -----------  Animations  ----------- */

@keyframes aguFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes aguPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* -----------  Container  ----------- */

.agu-container {
    max-width: 400px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    box-sizing: border-box;
}

/* -----------  Upload Zone  ----------- */

.agu-upload-zone {
    position: relative;
    border: 2px dashed #e4f0f7;
    background: #fafafa;
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.agu-upload-zone:hover {
    border-color: #c7dbe5;
    background: #edeeef;
}

.agu-upload-zone.agu-dragover {
    border-color: #414141;
    background: #f7f7f7;
    transform: scale(1.01);
}

/* -----------  Upload Icon  ----------- */

.agu-upload-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.agu-upload-icon .dashicons {
    color: #357095;
    font-size: 30px;
    width: 30px;
    height: 30px;
}

/* -----------  Upload Text  ----------- */

.agu-upload-title {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.agu-upload-text {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* -----------  File Requirements  ----------- */

.agu-file-requirements {
    background: #fff;
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 0.85rem;
    color: #666;
    max-width: 300px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.agu-file-requirements ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.agu-file-requirements li {
    display: flex;
    align-items: center;
    margin: 0.3rem 0;
}

.agu-file-requirements li:before {
    content: '•';
    color: #414141;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* -----------  Hidden File Input  ----------- */

.agu-file-input {
    display: none;
}

/* -----------  Preview Container & Gallery  ----------- */

.agu-preview-container {
    margin: 1rem auto;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    display: none;
}

.agu-preview-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* -----------  Preview Items  ----------- */

.agu-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.agu-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.agu-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* -----------  Remove Preview Button  ----------- */

.agu-remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
    font-size: 16px;
    line-height: 1;
}

.agu-remove-preview:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* -----------  Upload Button  ----------- */

.agu-upload-button {
    background: #357095;
    color: white;
    padding: 0.6rem 2rem;
    border: none;
    border-radius: 2px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 60%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agu-upload-button:hover {
    background: #A78B5C;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.agu-upload-button:active {
    transform: translateY(0);
}

.agu-upload-button:disabled {
    background: #bbdefb;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* -----------  Upload Message  ----------- */

.agu-upload-message {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0;
    height: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.agu-upload-message.agu-show {
    display: block;
    opacity: 1;
    height: auto;
    margin-bottom: 1rem;
}

.agu-upload-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.agu-upload-error {
    background: #fdecea;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

/* -----------  Progress Bar  ----------- */

.agu-progress-container {
    width: 100%;
    background-color: #f5f5f5;
    border-radius: 10px;
    margin: 1rem 0;
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.agu-progress-container.agu-show {
    height: 12px;
    opacity: 1;
    margin: 1rem 0;
}

.agu-progress-bar {
    height: 12px;
    background-color: #4CAF50;
    width: 0%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* -----------  Uploading Text  ----------- */

.agu-uploading-text {
    text-align: center;
    font-size: 0.9rem;
    color: #414141;
    margin-top: 0.5rem;
    display: none;
}

.agu-uploading-text.agu-show {
    display: block;
}

/* -----------  Gallery Preview  ----------- */

.agu-gallery-preview {
    display: none;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    height: 0;
    overflow: hidden;
}

.agu-gallery-preview.agu-show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    height: auto;
}

.agu-gallery-preview-title {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.agu-gallery-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.agu-gallery-item {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: aguFadeIn 0.5s ease forwards;
    opacity: 0;
}

.agu-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -----------  Utility: Uploading Pulse  ----------- */

.agu-uploading {
    animation: aguPulse 1.5s infinite;
}
