/* Panel Profile Plugin Styles - Tailwind CSS Only */

/* Profile page specific styles - minimal custom CSS for Tailwind integration */

/* Aspect ratio helper (16:9) so placeholders stay visible on mobile */
.aspect-w-16.aspect-h-9 {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 9 / 16 */
}

.aspect-w-16.aspect-h-9 > :first-child {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* High-quality image rendering for all profile content images */
.product-card img,
.service-card img,
.blog-card img,
.portfolio-card img {
    image-rendering: auto; /* Use browser's best quality algorithm */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
}

/* Product Card Purchase Button Styling */
.product-card .mt-3 button {
    padding: 0.5rem 1rem !important; /* Reduced button padding */
    font-size: 0.875rem !important; /* Slightly smaller font */
    border-radius: 0.5rem !important; /* Rounded corners */
    transition: all 0.2s ease !important; /* Smooth transitions */
}

.product-card .mt-3 button:hover {
    transform: translateY(-1px) !important; /* Slight lift on hover */
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important; /* Blue shadow on hover */
}

/* Service and Blog Cards - Fix layout when content is short */
.service-card,
.blog-card {
    min-height: auto; /* Kart yüksekliği içeriğe göre ayarlansın */
}

/* Başlıkları 2 satırda kısırgaçla (line clamp) */
.service-card h2,
.blog-card h2,
.service-card .card-title,
.blog-card .card-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Anchor içindeki başlık metni için de clamp uygula */
.service-card h2 a,
.blog-card h2 a,
.service-card .card-title a,
.blog-card .card-title a {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.25 !important;
    max-height: 2.5em !important; /* 2 satır sınırı */
    white-space: normal !important;
}

/* Masaüstünde başlık ve açıklama başlangıç hizasını eşitle */
@media (min-width: 768px) {
    .service-card h2,
    .blog-card h2,
    .service-card .card-title,
    .blog-card .card-title {
        min-height: 2.5em !important; /* 2 satır için yer ayır */
    }

    .service-card .card-excerpt,
    .blog-card .card-excerpt {
        min-height: 3.75em !important; /* ~3 satır (1.25 line-height varsayımı) */
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        white-space: normal !important;
    }
}

.service-card .p-4,
.blog-card .p-4 {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.service-card .p-4 .flex-grow,
.blog-card .p-4 .flex-grow {
    flex-grow: 0 !important;
    min-height: 0 !important;
}

/* Ensure buttons stay at bottom */
.service-card .mt-auto,
.blog-card .mt-auto {
    margin-top: auto !important;
}

/* Grid layout fixes */
.services-grid,
.posts-grid {
    align-items: stretch !important;
}

.services-grid .service-card,
.posts-grid .blog-card {
    display: flex !important;
    flex-direction: column !important;
}
.profile-container {
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Force profile header width - removed max-width restriction */
.max-w-2xl.w-full.mb-8 {
    width: 100%;
}

/* Force button spacing */
.flex.space-x-4 > * + * {
    margin-left: 0.75rem !important;
}

/* Bio toggle button */
.panel-profile-bio-toggle {
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    font-size: inherit;
    color: #3b82f6 !important;
    text-decoration: none;
    display: inline;
}

.panel-profile-bio-toggle:hover {
    color: #60a5fa !important;
    text-decoration: underline;
}

/* Instagram-style message notifications */
.panel-profile-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #262626;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.panel-profile-message-show {
    transform: translateX(0);
}

.panel-profile-message-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-profile-message-icon {
    font-weight: bold;
}

.panel-profile-message-text {
    font-size: 14px;
}

.panel-profile-message.panel-profile-success {
    background: #1a5f1a;
    border-left: 4px solid #22c55e;
}

.panel-profile-message.panel-profile-error {
    background: #5f1a1a;
    border-left: 4px solid #ef4444;
}

.panel-profile-message.panel-profile-info {
    background: #1a3a5f;
    border-left: 4px solid #3b82f6;
}

.panel-profile-message.panel-profile-warning {
    background: #5f4a1a;
    border-left: 4px solid #f59e0b;
}


/* Loading states */
.panel-profile-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.panel-profile-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0095f6;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: panel-profile-spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
    /* Mobilde kartların gereksiz yere uzamamasını sağla */
    .service-card,
    .blog-card {
        min-height: auto !important;
    }

    .service-card .p-4 .flex-grow,
    .blog-card .p-4 .flex-grow {
        min-height: 0 !important;
        flex-grow: 0 !important;
    }

    /* Aksiyon satırı mobilde altta sabitlenmesin */
    .service-card .mt-auto,
    .blog-card .mt-auto {
        margin-top: 0 !important;
    }

    /* Görsel ile içerik arasındaki boşluk mobilde optimize */
    .aspect-w-16.aspect-h-9.mb-4 {
        margin-bottom: 0.5rem !important; /* 8px */
    }

    .panel-profile-message {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .panel-profile-message-show {
        transform: translateY(0);
    }
}

