/* Custom styles for LinkSnap PHP */

:root {
    --primary-gradient: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
}

/* Body and layout */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Enhanced cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Form enhancements */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

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

/* Button enhancements */
.btn {
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.3s ease;
    background: var(--primary-gradient);
}

.progress {
    height: 0.5rem;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* Image preview styles */
#imagePreview img {
    border: 2px solid var(--bs-border-color);
    transition: border-color 0.2s ease;
}

#imagePreview img:hover {
    border-color: var(--bs-primary);
}

/* Feature boxes */
.bg-dark {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bg-dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Loading states */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive text */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1.125rem;
    }
}

/* File input styling */
.form-control[type="file"] {
    padding: 0.375rem 0.75rem;
}

.file-name-feedback {
    color: var(--bs-success);
    font-weight: 500;
}

/* Alert enhancements */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}

/* Navbar brand */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Footer styles */
footer {
    flex-shrink: 0;
}

/* Copy button feedback */
.btn.btn-success {
    transition: all 0.2s ease-in-out;
}

/* Link preview on redirect page */
.card-body img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Countdown styling */
#countdown {
    font-size: 1.5rem;
    color: var(--bs-primary) !important;
}

/* Responsive utilities */
.text-break {
    word-wrap: break-word !important;
    word-break: break-word !important;
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Focus states for accessibility */
.btn:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn,
    .alert {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* Additional form validation styles */
.was-validated .form-control:invalid {
    border-color: var(--bs-danger);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-danger-rgb), 0.25);
}

.was-validated .form-control:valid {
    border-color: var(--bs-success);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-success-rgb), 0.25);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Social media preview card */
.social-preview {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}

.social-preview img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: cover;
}

.social-preview-content {
    padding: 1rem;
}

.social-preview-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--bs-body-color);
}

.social-preview-description {
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.social-preview-url {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.success {
    background-color: var(--bs-success);
}

.status-indicator.warning {
    background-color: var(--bs-warning);
}

.status-indicator.danger {
    background-color: var(--bs-danger);
}

/* Code blocks */
.code-block {
    background: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
}

/* Utility classes */
.cursor-pointer {
    cursor: pointer;
}

.user-select-all {
    user-select: all;
}

.transition-all {
    transition: all 0.2s ease-in-out;
}