/**
 * Public CSS for Add as Preferred Source
 *
 * @since      1.0.0
 *
 * @package    Add_As_Preferred_Source
 * @subpackage Add_As_Preferred_Source/public/css
 */

/* Preferred Source Banner */
.add-as-preferred-source-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    width: 100%;
    padding: 10px 15px;
    box-sizing: border-box;
    z-index: 999999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    left: 0;
    right: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-as-preferred-source-banner:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.add-as-preferred-source-banner.position-top {
    top: 0;
    animation: add-as-preferred-source-slide-in-top 0.5s ease;
}

.add-as-preferred-source-banner.position-bottom {
    bottom: 0;
    animation: add-as-preferred-source-slide-in-bottom 0.5s ease;
}

@keyframes add-as-preferred-source-slide-in-top {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes add-as-preferred-source-slide-in-bottom {
    0% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(0);
    }
}

.add-as-preferred-source-banner.hidden {
    display: none;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.banner-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
    margin-right: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.google-button-image {
    flex-shrink: 0;
    margin-left: 12px;
    display: flex;
    align-items: center;
}

.google-button-image img {
    height: 28px;
    width: auto;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.close-button {
    margin-left: 15px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s;
    font-weight: bold;
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Additional styles for admin bar */
body.admin-bar .add-as-preferred-source-banner.position-top {
    top: 46px;
}

@media screen and (min-width: 783px) {
    body.admin-bar .add-as-preferred-source-banner.position-top {
        top: 32px;
    }
}

/* Dynamic padding is now handled by JS */
body.has-add-as-preferred-source-banner {
    transition: padding 0.3s ease;
}

/* Responsive styles */
@media screen and (max-width: 480px) {
    .banner-text {
        font-size: 13px;
        margin-right: 8px;
    }
    
    .google-button-image img {
        height: 24px;
    }
    
    .close-button {
        font-size: 18px;
        margin-left: 8px;
    }
}

@media screen and (max-width: 360px) {
    .add-as-preferred-source-banner {
        padding: 8px 12px;
    }
    
    .banner-text {
        font-size: 12px;
    }
    
    .google-button-image img {
        height: 22px;
    }
}