/* Ensure Inter font is used for the entire tool */
#serp-snippet-preview-container {
    font-family: 'Inter', sans-serif;
}

/* Input Group Styling */
.input-group label {
    font-size: 0.95rem;
    font-weight: 600;
}

.input-group input[type="text"],
.input-group input[type="url"],
.input-group textarea {
    min-height: 44px; /* Consistent height for inputs */
    padding: 10px 15px;
    border: 1px solid #d1d5db; /* Light gray border */
    border-radius: 0.5rem; /* rounded-lg */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: #3b82f6; /* blue-500 */
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); /* focus-ring-2 */
}

/* Helper text for character/pixel counts */
.input-group p.text-xs {
    color: #6b7280; /* gray-500 */
    margin-top: 0.25rem;
}

/* Button Styling (Clear All, Copy Snippet Text) */
#serp-snippet-preview-container button {
    padding: 10px 20px;
    border-radius: 0.5rem; /* rounded-lg */
    font-weight: 600; /* font-semibold */
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* shadow-md */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#serp-snippet-preview-container button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

#serp-snippet-preview-container button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Specific button colors (Tailwind classes used directly in HTML) */
/* Clear All: bg-gray-400 text-white hover:bg-gray-500 */
/* Copy Snippet: bg-purple-600 text-white hover:bg-purple-700 */


/* Preview Section Styling */
.preview-section {
    background-color: #f9fafb; /* gray-50 */
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.75rem; /* rounded-lg */
    padding: 1.5rem; /* p-6 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.google-snippet-mockup {
    background-color: #ffffff;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.5rem; /* rounded-lg */
    padding: 1rem; /* p-4 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* shadow-sm */
    text-align: left; /* Ensure text aligns left within mockup */
}

/* SERP Snippet Elements */
.snippet-url {
    color: #1a73e8; /* Google's blue for URL is typically brighter, this is closer to green-700 */
    font-size: 0.875rem; /* text-sm */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* truncate */
    margin-bottom: 0.125rem; /* mb-0.5 */
}

.snippet-title {
    color: #1a0dab; /* Google's blue link color */
    font-size: 1.25rem; /* text-xl */
    font-weight: 500; /* font-medium */
    cursor: pointer;
    margin-bottom: 0.25rem; /* mb-1 */
    line-height: 1.2;
    word-break: break-word; /* Ensure long titles wrap */
}

.snippet-title:hover {
    text-decoration: underline;
}

.snippet-description {
    color: #4d5156; /* Google's dark gray for description */
    font-size: 0.875rem; /* text-sm */
    line-height: 1.4; /* leading-tight */
    word-break: break-word; /* Ensure long descriptions wrap */
}

/* Message Display (hidden by default) */
.message-display {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    background-color: #e0f2fe; /* Light blue background */
    border: 1px solid #93c5fd; /* Blue border */
    color: #1e40af; /* Dark blue text */
    transition: all 0.3s ease;
}

/* Error message styling */
.message-display.error {
    background-color: #fee2e2; /* Red background */
    border-color: #f87171; /* Red border */
    color: #dc2626; /* Red text */
}

/* Utility class for hiding elements */
.hidden {
    display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #serp-snippet-preview-container {
        padding: 1.5rem;
        margin: 1rem auto;
    }
    h2 {
        font-size: 2rem;
    }
    .description {
        font-size: 0.95rem;
    }
    .input-section, .preview-section {
        padding: 1rem;
    }
    .input-group label {
        font-size: 0.9rem;
    }
    .input-group input, .input-group textarea {
        padding: 8px 12px;
        font-size: 0.95rem;
    }
    .input-group p.text-xs {
        font-size: 0.7rem;
    }
    #serp-snippet-preview-container button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    .snippet-url {
        font-size: 0.8rem;
    }
    .snippet-title {
        font-size: 1.1rem;
    }
    .snippet-description {
        font-size: 0.8rem;
    }
    .message-display {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
    .flex-col.sm:flex-row {
        flex-direction: column; /* Stack buttons on small screens */
    }
}

@media (max-width: 480px) {
    #serp-snippet-preview-container {
        padding: 1rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    .description {
        font-size: 0.85rem;
    }
    .google-snippet-mockup {
        padding: 0.75rem;
    }
}
