/**
 * Demo Files Download Plugin - Premium V2 Styles
 */

:root {
    --demofiles-brand-gradient: linear-gradient(270deg, #E04C74, #E15A53, #E04C74);
    --demofiles-accent: #DF4979;
    --demofiles-border: #ebebeb;
    --demofiles-text: #666666;
    --demofiles-bg-input: #f9f9f9;
}

/* Modal Styling */
#demofilesdownload-modal .modal-dialog {
    max-width: 480px;
}

#demofilesdownload-modal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    background: #fff;
    position: relative;
}

#demofilesdownload-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--demofiles-brand-gradient);
    z-index: 10;
}

#demofilesdownload-modal .modal-header {
    background: #fff;
    border-bottom: none;
    padding: 1.5rem 1.5rem 0.5rem;
    position: relative;
    display: flex;
    justify-content: center;
}

#demofilesdownload-modal .modal-title {
    color: #2c3e50;
    font-weight: 800;
    font-size: 1.4rem;
    text-align: center;
}

#demofilesdownload-modal .btn-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    opacity: 0.3;
    transition: 0.3s;
    background-color: transparent;
    border: none;
}

#demofilesdownload-modal .btn-close:hover {
    opacity: 1;
}

#demofilesdownload-modal .modal-body {
    padding: 1rem 2rem 2.5rem;
}

/* Intro Styles */
.demofilesdownload-intro-text p {
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 1.5rem;
}

.demofilesdownload-btn-stack {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Form Components */
.demofiles-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.demofiles-input-wrapper i {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 1.1rem;
    transition: 0.3s;
    pointer-events: none;
    z-index: 5;
}

#demofilesdownload-modal .form-control {
    width: 100%;
    padding: 0.75rem 1.2rem;
    padding-left: 2.8rem;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: var(--demofiles-bg-input);
    color: #333;
}

#demofilesdownload-modal .form-control:focus {
    border-color: var(--demofiles-accent);
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(223, 73, 121, 0.1);
    outline: none;
}

.demofiles-input-wrapper .form-control:focus+i {
    color: var(--demofiles-accent);
}

/* Custom Buttons */
.btn-demofiles-primary {
    background: var(--demofiles-brand-gradient);
    border: none;
    color: white !important;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(224, 76, 116, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.btn-demofiles-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 76, 116, 0.4);
}

.btn-demofiles-outline {
    background: transparent;
    border: 2px solid var(--demofiles-border);
    color: #555 !important;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
}

.btn-demofiles-outline:hover {
    border-color: var(--demofiles-accent);
    color: var(--demofiles-accent) !important;
    background: #fff;
}

.btn-demofiles-back {
    color: #999 !important;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    transition: 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    width: auto !important;
}

.btn-demofiles-back:hover {
    color: var(--demofiles-accent) !important;
}

/* User Exists Screen */
.demofiles-user-exists-icon {
    width: 80px;
    height: 80px;
    background: #F0F7FF;
    color: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.2rem;
    position: relative;
}

.demofiles-user-exists-icon::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26px;
    height: 26px;
    background: #2ecc71;
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
}

/* Centered Success Overlay */
.demofiles-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.demofiles-success-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.demofiles-success-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-top: 5px solid #2ecc71;
}

.demofiles-success-overlay.active .demofiles-success-card {
    transform: translateY(0);
}

.success-icon-large {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #E8F8F0, #D1F2EB);
    color: #2ecc71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

/* Alerts */
.demofiles-alert {
    background-color: #FFF5F7;
    border-left: 4px solid #dc3545;
    color: #a71d2a;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Mobile Adjustments */
@media (max-width: 576px) {
    #demofilesdownload-modal .modal-body {
        padding: 1.5rem;
    }
}


/* Product Page Link */
.demofiles-download-link {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    clear: both;
    flex-basis: 100%;
}

.btn-demo-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    color: var(--demofiles-accent) !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 30px;
    background: #fff;
    border: 1.5px solid var(--demofiles-accent);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(223, 73, 121, 0.08);
}

.btn-demo-download:hover {
    background: var(--demofiles-accent);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(223, 73, 121, 0.2);
}

.btn-demo-download i {
    font-size: 1.1rem;
}