/* Google Ads Preview Styles */
.google-ads-preview-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.google-ads-preview-container h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    font-weight: 500;
}

.preview-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.preview-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.preview-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 500;
}

.preview-tab:hover {
    color: #1a73e8;
}

.preview-content {
    display: none;
}

.preview-content.active {
    display: block;
}

/* Desktop Ad Preview */
.desktop-ad-preview {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    background: #fff;
    font-family: arial, sans-serif;
}

.desktop-ad-preview .ad-url {
    font-size: 14px;
    color: #006621;
    margin-bottom: 2px;
    line-height: 1.3;
}

.desktop-ad-preview .ad-title {
    font-size: 20px;
    color: #1a0dab;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 4px;
    display: block;
    font-weight: normal;
}

.desktop-ad-preview .ad-title:hover {
    text-decoration: underline;
}

.desktop-ad-preview .ad-description {
    font-size: 14px;
    color: #4d5156;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Mobile Ad Preview */
.mobile-ad-preview {
    max-width: 360px;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    background: #fff;
    font-family: arial, sans-serif;
}

.mobile-ad-preview .ad-url {
    font-size: 12px;
    color: #006621;
    margin-bottom: 2px;
    line-height: 1.3;
}

.mobile-ad-preview .ad-title {
    font-size: 18px;
    color: #1a0dab;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 4px;
    display: block;
    font-weight: normal;
}

.mobile-ad-preview .ad-title:hover {
    text-decoration: underline;
}

.mobile-ad-preview .ad-description {
    font-size: 13px;
    color: #4d5156;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Ad Label */
.ad-label {
    display: inline-block;
    font-size: 11px;
    color: #70757a;
    border: 1px solid #dadce0;
    border-radius: 2px;
    padding: 1px 4px;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Character Counter */
.character-counter {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.character-counter .counter-item {
    margin-bottom: 4px;
}

.character-counter .counter-item:last-child {
    margin-bottom: 0;
}

.character-counter .over-limit {
    color: #d93025;
    font-weight: 500;
}

.character-counter .within-limit {
    color: #137333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .google-ads-preview-container {
        margin: 10px;
        padding: 15px;
    }
    
    .preview-tabs {
        flex-wrap: wrap;
    }
    
    .preview-tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .desktop-ad-preview {
        max-width: 100%;
    }
    
    .mobile-ad-preview {
        max-width: 100%;
    }
}

/* Animation for tab switching */
.preview-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.preview-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.preview-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error state */
.preview-error {
    text-align: center;
    padding: 20px;
    color: #d93025;
    background: #fce8e6;
    border-radius: 4px;
    margin: 10px 0;
}

/* Success state */
.preview-success {
    text-align: center;
    padding: 20px;
    color: #137333;
    background: #e6f4ea;
    border-radius: 4px;
    margin: 10px 0;
}

