/**
 * Frontend Styles
 * Main stylesheet for all iframe widgets on the frontend
 */

/* Modal Popup Styles */
.eiw-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999 !important;
}

.eiw-modal.eiw-active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.eiw-modal-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.eiw-modal-container {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    z-index: 1;
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease;
}

.eiw-modal.eiw-active .eiw-modal-container {
    transform: scale(1);
    opacity: 1;
}

.eiw-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: background 0.3s ease;
}

.eiw-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.eiw-modal-content {
    width: 100%;
    height: 100%;
}

.eiw-modal-trigger {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.eiw-modal-trigger:hover {
    background: #005177;
}

/* Slide-in Panel Styles */
.eiw-panel {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999 !important;
}

.eiw-panel.eiw-active {
    display: block !important;
}

.eiw-panel-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.eiw-panel-container {
    position: absolute;
    background: #fff;
    transition: transform 0.3s ease;
    overflow: auto;
    z-index: 1;
}

.eiw-panel-right .eiw-panel-container {
    right: 0;
    top: 0;
    height: 100%;
    transform: translateX(100%);
}

.eiw-panel-right.eiw-active .eiw-panel-container {
    transform: translateX(0);
}

.eiw-panel-left .eiw-panel-container {
    left: 0;
    top: 0;
    height: 100%;
    transform: translateX(-100%);
}

.eiw-panel-left.eiw-active .eiw-panel-container {
    transform: translateX(0);
}

.eiw-panel-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.eiw-panel-trigger {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Iframe Styles */
.eiw-iframe {
    width: 100%;
    height: 500px;
    border: none;
    display: block;
}

.eiw-iframe-placeholder {
    padding: 40px;
    text-align: center;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 4px;
}

/* Login Form Styles */
.eiw-login-form {
    max-width: 400px;
}

.eiw-login-form input[type="text"],
.eiw-login-form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.eiw-login-form input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.eiw-lost-password {
    text-align: center;
    margin-top: 15px;
}

/* Navigation Menu Styles */
.eiw-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.eiw-nav-horizontal {
    display: flex;
    gap: 20px;
}

.eiw-nav-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eiw-nav-menu a {
    -webkit-text-decoration: none;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Redirect Button Styles */
.eiw-redirect-button {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    -webkit-text-decoration: none;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.eiw-redirect-button:hover {
    background: #005177;
}

/* Body lock when modal/panel is open */
body.eiw-modal-open,
body.eiw-panel-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .eiw-modal-container {
        max-width: 95%;
        max-height: 95%;
    }
    
    .eiw-panel-container {
        width: 90% !important;
    }
}

