/* URL Shortener specific styles */

.tool-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-sizing: border-box; /* Include padding in width */
}

.form-control::placeholder {
    color: #aaa;
}

.form-control:focus {
    border-color: #007bff; /* Primary color */
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.gap-3 > *:not(:last-child) {
    margin-right: 15px; /* Adjust spacing between buttons */
}

.output-item {
    position: relative;
    background-color: #f8f9fa;
    padding: 15px; /* Add padding for better look */
    border-radius: 5px;
    border: 1px solid #e9ecef;
    display: flex; /* Make it a flex container for copy button */
    align-items: center; /* Vertically align input and button */
}

.output-field {
    flex-grow: 1; /* Allow input to take available space */
    background-color: #fff;
    border: 1px solid #ddd;
    cursor: text; /* Indicate it's selectable */
    color: #555;
    white-space: nowrap; /* Prevent wrapping */
    overflow-x: auto; /* Allow horizontal scroll if content is too long */
    margin-right: 10px; /* Space between input and button */
}

.output-field::-webkit-scrollbar {
    height: 5px;
}
.output-field::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}
.output-field::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.copy-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1; /* Fix icon alignment */
    flex-shrink: 0; /* Prevent button from shrinking */
}

.copy-btn i {
    margin-right: 0;
}

.copy-btn:hover {
    background-color: #0056b3;
}

.error-message {
    color: #dc3545; /* Red for errors */
    font-size: 0.85rem;
    margin-top: 5px;
    display: block; /* Ensures it takes full width */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .output-item {
        flex-direction: column; /* Stack input and button on small screens */
        align-items: flex-start;
    }
    .output-field {
        margin-right: 0;
        margin-bottom: 10px; /* Space between input and button when stacked */
        width: 100%;
    }
    .copy-btn {
        width: 100%; /* Make button full width when stacked */
        padding: 10px;
    }
}