/* Link Tool Styles */
.link-tool {
    margin: 10px 0;
}

/* Input Styles */
.link-tool__input {
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 8px;
    background: #fff;
}

.link-tool__input-holder {
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-tool__input-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    background: #f8f9fa;
}

.link-tool__input-field:focus {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.link-tool__input-button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.link-tool__input-button:hover {
    background: #0056b3;
}

.link-tool__input-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Preview Styles */
.link-tool__preview {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.link-tool__preview-content {
    display: flex;
    align-items: stretch;
    min-height: 120px;
}

.link-tool__preview-image {
    flex: 0 0 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.link-tool__preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-tool__preview-info {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.link-tool__preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
}

.link-tool__preview-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-tool__preview-url {
    font-size: 12px;
    color: #007bff;
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

.link-tool__preview-actions {
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
}

.link-tool__preview-button {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.link-tool__preview-button:hover {
    background: #e9ecef;
}

.link-tool__preview-button[data-action="remove"]:hover {
    background: #f8d7da;
    color: #721c24;
}

.link-tool__preview-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Loading Styles */
.link-tool__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
}

.link-tool__loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e1e5e9;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.link-tool__loading-text {
    font-size: 14px;
    color: #6c757d;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .link-tool__preview-content {
        flex-direction: column;
    }
    
    .link-tool__preview-image {
        flex: 0 0 150px;
    }
    
    .link-tool__input-holder {
        flex-direction: column;
        gap: 12px;
    }
    
    .link-tool__input-button {
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .link-tool__input {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .link-tool__input-field {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .link-tool__input-field:focus {
        background: #2d3748;
    }
    
    .link-tool__preview {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .link-tool__preview-image {
        background: #1a202c;
    }
    
    .link-tool__preview-title {
        color: #e2e8f0;
    }
    
    .link-tool__preview-description {
        color: #a0aec0;
    }
    
    .link-tool__preview-actions {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .link-tool__preview-button:hover {
        background: #4a5568;
    }
    
    .link-tool__loading {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .link-tool__loading-text {
        color: #a0aec0;
    }
} 