/* Meta Tags Generator - Custom Styles */

/* Google SERP Preview Styles */
.google-serp-preview {
    font-family: arial, sans-serif;
    line-height: 1.4;
    max-width: 600px;
}

.serp-url {
    font-size: 14px;
    line-height: 20px;
    color: #1a0dab;
    margin-bottom: 2px;
}

.serp-title {
    font-size: 20px;
    line-height: 26px;
    color: #1a0dab;
    text-decoration: none;
    cursor: pointer;
    font-weight: 400;
    margin-bottom: 3px;
    display: block;
}

.serp-title:hover {
    text-decoration: underline;
}

.serp-description {
    font-size: 14px;
    line-height: 20px;
    color: #4d5156;
    max-width: 600px;
}

/* Open Graph Preview Styles */
.og-preview-card {
    max-width: 500px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #ffffff;
    border: 1px solid #e4e6ea;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.og-image {
    width: 100%;
    height: auto;
    display: block;
    background-size: cover;
    background-position: center;
    aspect-ratio: 1.91 / 1;
}

.og-url {
    font-size: 12px;
    line-height: 16px;
    color: #65676b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.og-title {
    font-size: 16px;
    line-height: 20px;
    color: #1c1e21;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.og-description {
    font-size: 14px;
    line-height: 18px;
    color: #65676b;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Twitter Card Preview Styles */
.twitter-preview-card {
    max-width: 505px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

.twitter-preview-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.twitter-image {
    width: 100%;
    height: auto;
    display: block;
    background-size: cover;
    background-position: center;
}

.twitter-title {
    font-size: 15px;
    line-height: 20px;
    color: #0f1419;
    font-weight: 700;
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.twitter-description {
    font-size: 15px;
    line-height: 20px;
    color: #536471;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
}

.twitter-url {
    font-size: 15px;
    line-height: 20px;
    color: #536471;
}

/* Form Validation Styles */
.validation-message {
    transition: all 0.2s ease-in-out;
}

.validation-error {
    color: #dc2626;
    font-weight: 500;
}

.validation-warning {
    color: #d97706;
    font-weight: 500;
}

.validation-success {
    color: #059669;
    font-weight: 500;
}

.validation-info {
    color: #2563eb;
    font-weight: 500;
}

/* Character Counter Styles */
.character-counter {
    font-size: 12px;
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}

.counter-good {
    color: #6b7280;
}

.counter-warning {
    color: #d97706;
}

.counter-error {
    color: #dc2626;
}

/* Loading Animation */
.loading-spinner {
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Color Picker Styles */
.color-picker-container {
    position: relative;
    display: flex;
    align-items: center;
}

.color-picker-swatch {
    width: 48px;
    height: 48px;
    border: 2px solid #e5e7eb;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    appearance: none;
    background: transparent;
    transition: border-color 0.2s ease-in-out;
}

.color-picker-swatch:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.color-picker-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-left: none;
    border-radius: 0 12px 12px 0;
    font-size: 14px;
    transition: border-color 0.2s ease-in-out;
}

.color-picker-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Export Code Block Styles */
.export-code-block {
    font-family: "Fira Code", "Monaco", "Cascadia Code", "Roboto Mono", monospace;
    font-size: 13px;
    line-height: 1.6;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.export-code-block .comment {
    color: #64748b;
    font-style: italic;
}

.export-code-block .tag {
    color: #38bdf8;
}

.export-code-block .attribute {
    color: #f59e0b;
}

.export-code-block .value {
    color: #10b981;
}

/* Notification Styles */
.notification {
    font-size: 14px;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    max-width: 400px;
    word-wrap: break-word;
}

.notification-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.notification-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.notification-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.notification-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

/* Modal Styles */
.modal-backdrop {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    animation: slideUp 0.3s ease-out;
    transform-origin: center bottom;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .og-preview-card {
        max-width: 100%;
    }

    .twitter-preview-card {
        max-width: 100%;
    }

    .google-serp-preview {
        max-width: 100%;
    }

    .serp-title {
        font-size: 18px;
        line-height: 24px;
    }

    .export-code-block {
        font-size: 12px;
        padding: 12px;
    }
}

@media (max-width: 640px) {
    .modal-content {
        margin: 16px;
        width: calc(100% - 32px);
    }

    .notification {
        margin-right: 16px;
        margin-top: 16px;
        max-width: calc(100% - 32px);
    }
}

/* Focus States for Accessibility */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .og-preview-card,
    .twitter-preview-card {
        border-color: currentColor;
        border-width: 2px;
    }

    .serp-title {
        color: #0000ee;
    }

    .serp-description {
        color: #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* LinkedIn Preview Styles */
.linkedin-preview-card {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 520px;
    background: #ffffff;
    border: 1px solid #e1e9ee;
    border-radius: 8px;
    overflow: hidden;
}

.linkedin-image {
    width: 100%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
}

.linkedin-title {
    color: rgba(0, 0, 0, 0.9);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.25;
    margin-bottom: 4px;
}

.linkedin-description {
    color: rgba(0, 0, 0, 0.6);
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.linkedin-url {
    color: rgba(0, 0, 0, 0.6);
    font-size: 12px;
    text-transform: lowercase;
}

/* Pinterest Preview Styles */
.pinterest-preview-card {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 236px;
}

.pinterest-image {
    width: 100%;
    background-color: #f1f1f1;
    border-radius: 16px 16px 0 0;
}

.pinterest-title {
    color: #211922;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 4px;
}

.pinterest-description {
    color: #767676;
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.pinterest-url {
    color: #767676;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Slack Preview Styles */
.slack-preview-card {
    font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
    max-width: 360px;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
}

.slack-image {
    width: 100%;
    background-color: #f8f8f8;
}

.slack-title {
    color: #1264a3;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 4px;
    text-decoration: none;
}

.slack-title:hover {
    text-decoration: underline;
}

.slack-description {
    color: #1d1c1d;
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.slack-url {
    color: #696969;
    font-size: 12px;
}

/* Discord Preview Styles */
.discord-preview-card {
    font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif;
    max-width: 432px;
    background: #36393f;
    border-radius: 4px;
    overflow: hidden;
}

.discord-title {
    color: #00b0f4;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.discord-description {
    color: #dcddde;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 16px;
}

.discord-image {
    width: 100%;
    background-color: #2f3136;
    border-radius: 4px;
}

.discord-url {
    color: #72767d;
    font-size: 12px;
}

/* Telegram Preview Styles */
.telegram-preview-card {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 480px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e5ea;
}

.telegram-image {
    width: 100%;
    background-color: #f0f8ff;
}

.telegram-title {
    color: #000000;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    margin-bottom: 4px;
}

.telegram-description {
    color: #6d6d72;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.telegram-url {
    color: #007aff;
    font-size: 13px;
    font-weight: 400;
}

/* WhatsApp Preview Styles */
.whatsapp-preview-card {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 320px;
    background: #ffffff;
}

.whatsapp-image {
    width: 100%;
    background-color: #e8f5e8;
    border-radius: 8px 8px 0 0;
}

.whatsapp-title {
    color: #1f2937;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 4px;
}

.whatsapp-description {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.whatsapp-url {
    color: #25d366;
    font-size: 12px;
    font-weight: 500;
}

/* Print Styles */
@media print {
    .google-serp-preview,
    .og-preview-card,
    .twitter-preview-card,
    .linkedin-preview-card,
    .pinterest-preview-card,
    .slack-preview-card,
    .discord-preview-card,
    .telegram-preview-card,
    .whatsapp-preview-card {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 16px;
    }

    .export-code-block {
        background: #f8f9fa;
        color: #000;
        border: 1px solid #000;
        white-space: pre-wrap;
        word-break: break-all;
    }
}
