/**
 * Super Speedy Welcome - Frontend Styles
 */

/* Navigation buttons for multiple messages */
.ssw-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    clear: both;
    width: 100%;
}

.ssw-nav-btn {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    color: #666!important;
    font-weight:400;
    text-transform:capitalize;
}

.ssw-nav-btn:hover {
    background-color: #e8e8e8;
    color: #333;
}

.ssw-message-counter {
    font-size: 12px;
    color: #666;
}

/**
 * Super Speedy Welcome - Styles
 */

/* Overlay for the popover */
.ssw-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.ssw-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Common styles for both states */
.ssw-container {
    position: fixed;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

/* Popover Container */
.ssw-popover {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    max-width: 90%;
    border-radius: 8px;
    font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Active state */
.ssw-container.active {
    opacity: 1;
    visibility: visible;
}

/* Popover Header */
.ssw-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Logo */
.ssw-logo {
    height: 30px;
    display: flex;
    align-items: center;
}

.ssw-logo img {
    height: 24px;
    width: auto;
}

/* Country Flag */
.ssw-country-flag {
    width: 40px;
    height: 30px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border: 1px solid #ddd;
    margin-right: 15px;
    border-radius: 2px;
    display: none; /* Hide by default, JavaScript will show it if flag is available */
}

.ssw-country-flag.has-flag {
    display: block;
}

/* Close Button */
.ssw-close-btn {
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #9933cc;
    transition: color 0.2s;
}

.ssw-close-btn:hover {
    color: #7a29a3;
}

/* Popover Content */
.ssw-popover-content {
    padding: 20px;
}

/* Message container with flag */
.ssw-popover-content {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: flex-start;
    position: relative;
}

/* Message */
.ssw-message {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    flex: 1;
    margin-bottom: 15px;
}

/* Minimized Bar */
.ssw-minimized-bar {
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #101010;
    border-top: 2px solid #9933cc;
    padding: 10px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    transform: translateY(100%);
}

.ssw-minimized-bar.active {
    transform: translateY(0);
}

.ssw-minimized-bar:hover {
    background-color: #000;
}

/* Mini Flag */
.ssw-mini-flag {
    width: 24px;
    height: 18px;
    background-size: cover;
    background-position: center;
    border: 1px solid #ddd;
    margin-right: 10px;
    display: none; /* Hide by default, JavaScript will show it if flag is available */
}

.ssw-mini-flag.has-flag {
    display: block;
}

/* Mini Message */
.ssw-mini-message {
    font-size: 14px;
    color: #f1f1f1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 10px;
    font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Mini Navigation */
.ssw-mini-navigation {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding-left: 10px;
    border-left: 1px solid #ddd;
}

.ssw-mini-nav-arrows {
    display: flex;
    flex-direction: column;
    margin-right: 5px;
}

.ssw-mini-nav-up, .ssw-mini-nav-down {
    font-size: 10px;
    line-height: 10px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.ssw-mini-nav-up:hover, .ssw-mini-nav-down:hover {
    color: #333;
}

.ssw-mini-counter {
    font-size: 12px;
    color: #666;
    min-width: 24px;
    text-align: center;
}

/* Primary Button Style (if needed) */
.ssw-primary-btn {
    background-color: #9933cc;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.ssw-primary-btn:hover {
    background-color: #7a29a3;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .ssw-popover {
        width: 95%;
    }
    
    .ssw-popover-content {
        flex-direction: column;
    }
    
    .ssw-country-flag {
        margin-bottom: 10px;
        width: 36px;
        height: 27px;
    }
    
    .ssw-message {
        font-size: 14px;
    }
    
    .ssw-mini-message {
        font-size: 12px;
    }
}