/* Ads Rotate GST Frontend Styles */

.ads-rotate-container {
    display: block;
    text-align: center;
    margin: 20px 0;
    max-width: 100%;
}

/* Portrait ads (default) */
.ads-rotate-portrait {
    max-width: 300px;
    margin: 20px auto;
}

/* Landscape ads */
.ads-rotate-landscape {
    max-width: 100%;
    margin: 20px 0;
}

.ads-rotate-landscape .ads-rotate-image {
    max-height: 200px;
    width: auto;
}

.ads-rotate-link {
    display: inline-block;
    text-decoration: none;
    border: none;
    outline: none;
}

.ads-rotate-link:hover {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.ads-rotate-image {
    max-width: 100%;
    height: auto;
    display: block;
    border: none;
    outline: none;
}

/* Style for ads without links */
.ads-rotate-no-link {
    cursor: default;
}

/* HTML/JavaScript ads */
.ads-rotate-html {
    overflow: hidden;
    position: relative;
}

.ads-rotate-html * {
    max-width: 100% !important;
}

/* Portrait HTML ads */
.ads-rotate-portrait.ads-rotate-html {
    max-width: 300px;
    min-height: 250px;
}

/* Landscape HTML ads */
.ads-rotate-landscape.ads-rotate-html {
    max-width: 100%;
    min-height: 90px;
}

/* Style for ads with links */
.ads-rotate-link .ads-rotate-image {
    cursor: pointer;
}

/* Responsive styles */
@media (max-width: 768px) {
    .ads-rotate-container {
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .ads-rotate-container {
        margin: 10px 0;
    }
}

/* Loading animation */
.ads-rotate-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Admin interface styles */
.view-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.view-type-portrait {
    background-color: #e1f5fe;
    color: #0277bd;
    border: 1px solid #81d4fa;
}

.view-type-landscape {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* Admin form styles */
#ads_rotate form .form-table th {
    width: 150px;
}

#ads_rotate .large-text.code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: 10px;
}

/* Ad type radio buttons */
input[name="ad_type"] {
    margin-right: 5px;
}

/* HTML content field */
#ad_html_content {
    resize: vertical;
    min-height: 150px;
}
