/* ==========================================
   SERP Snippet Generator Styles
========================================== */

/* Input Section Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.1);
}

.form-control-lg {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

/* Progress Bars */
.progress {
    background-color: #e5e7eb;
    border-radius: 10px;
}

.progress-bar {
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-bar.bg-warning {
    background-color: #f59e0b !important;
}

.progress-bar.bg-danger {
    background-color: #ef4444 !important;
}

/* Character & Pixel Counters */
#titlePixelValue,
#descPixelValue {
    min-width: 55px;
    display: inline-block;
    text-align: center;
}

#titlePixelValue.text-danger,
#descPixelValue.text-danger {
    background-color: #ef4444 !important;
}

#titlePixelValue.text-warning,
#descPixelValue.text-warning {
    background-color: #f59e0b !important;
}

/* SERP Preview Container */
.serp-preview-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 12px;
}

.serp-preview-container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
}

.serp-preview-container.mobile-preview {
    max-width: 375px;
}

/* SERP Result Styles (Matching Google) */
.serp-result {
    font-family: arial, sans-serif;
}

/* SERP URL */
.serp-url {
    color: #202124;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.serp-url::before {
    content: '';
    display: inline-block;
    width: 26px;
    height: 26px;
    margin-right: 12px;
    background: #f1f3f4;
    border-radius: 50%;
    flex-shrink: 0;
}

/* SERP Title */
.serp-title {
    color: #1a0dab;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 400;
    margin-bottom: 3px;
    cursor: pointer;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.serp-title:hover {
    text-decoration: underline;
}

.serp-title.text-danger {
    color: #dc3545 !important;
}

/* SERP Description */
.serp-description {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.58;
    font-weight: 400;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.serp-description.text-danger {
    color: #dc3545 !important;
}

/* Mobile SERP Styles */
.serp-result.mobile .serp-url {
    font-size: 12px;
    margin-bottom: 8px;
}

.serp-result.mobile .serp-url::before {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.serp-result.mobile .serp-title {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.serp-result.mobile .serp-description {
    font-size: 13px;
    line-height: 1.5;
}

/* View Toggle Buttons */
.btn-group .btn {
    border-radius: 6px !important;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.btn-group .btn:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.btn-outline-secondary.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Action Buttons */
#resetBtn,
#copyBtn {
    border-radius: 8px;
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

#resetBtn:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

#copyBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Info Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-notification.hiding {
    animation: slideOutRight 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .serp-preview-section {
        padding: 1.5rem 1rem;
    }

    .serp-preview-container {
        padding: 1.5rem 1rem;
    }

    .serp-title {
        font-size: 18px;
    }

    .serp-description {
        font-size: 13px;
    }

    #titlePixelCount,
    #descPixelCount {
        font-size: 0.75rem;
    }

    .btn-group {
        width: 100%;
    }

    .btn-group .btn {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1.5rem !important;
    }

    .d-flex.gap-2 {
        flex-direction: column;
    }

    #resetBtn,
    #copyBtn {
        width: 100%;
    }
}

/* Tooltip Styles */
.tooltip-custom {
    position: relative;
    display: inline-block;
}

.tooltip-custom .tooltip-text {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    white-space: nowrap;
}

.tooltip-custom:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease;
}

input,
textarea,
button {
    transition: all 0.3s ease;
}
