/**
 * Frontend CSS for Affiliate Ad Injector Pro
 */

/* Base container for all ad styles */
.aip-ad-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden; /* Clearfix */
}

/* Style 1: Image Left, Text Right */
.aip-ad-style-1 .aip-ad-image {
    float: left;
    width: 120px; /* Adjust as needed */
    margin-right: 15px;
}
.aip-ad-style-1 .aip-ad-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
.aip-ad-style-1 .aip-ad-content {
    overflow: hidden; /* So it doesn't wrap under the float */
}

/* Style 2: Image Top, Text Bottom */
.aip-ad-style-2 .aip-ad-image {
    text-align: center;
    margin-bottom: 10px;
}
.aip-ad-style-2 .aip-ad-image img {
    max-width: 200px; /* Adjust */
    height: auto;
    border-radius: 4px;
}
.aip-ad-style-2 .aip-ad-content {
    text-align: center;
}

/* Style 3: Text Only Highlight */
.aip-ad-style-3 {
    background-color: #f0f7ff;
    border-left: 4px solid #0073aa;
}
.aip-ad-style-3 .aip-ad-content {
    padding: 0 10px;
}

/* Common elements across styles */
.aip-ad-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1em;
    font-weight: bold;
}
.aip-ad-title a {
    text-decoration: none;
    color: #333;
}
.aip-ad-title a:hover {
    color: #0073aa;
}
.aip-ad-description {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 12px;
    line-height: 1.5;
}
.aip-ad-cta {
    display: inline-block;
    background-color: #0073aa;
    color: #fff !important; /* Important to override theme styles */
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.2s ease-in-out;
}
.aip-ad-cta:hover {
    background-color: #005a87;
    color: #fff !important;
    text-decoration: none;
}

/* Clearfix for floated elements if not using overflow:hidden on parent */
.aip-ad-container::after {
    content: "";
    clear: both;
    display: table;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .aip-ad-style-1 .aip-ad-image {
        float: none;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    .aip-ad-style-1 .aip-ad-image img {
        max-width: 120px;
    }
}
