/**
 * Frontend CSS
 */

/* Genel Container */
.scm-contact-container {
    font-family: var(--scm-font-family, 'Arial, sans-serif');
    font-size: var(--scm-font-size, 14px);
    font-weight: var(--scm-font-weight, normal);
    z-index: 9999 !important;
    transition: transform 0.3s ease;
    position: relative;
}

/* Floating Stil */
.scm-style-floating {
    position: fixed;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: var(--scm-icon-spacing, 10px);
}

.scm-style-floating.scm-position-left {
    left: 20px;
}

.scm-style-floating.scm-position-right {
    right: 20px;
}

.scm-style-floating.scm-position-center {
    left: 50%;
    transform: translateX(-50%);
}

/* Inline Stil */
.scm-style-inline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--scm-icon-spacing, 10px);
    padding: 20px;
}

/* Sidebar Stil */
.scm-style-sidebar {
    position: fixed;
    top: 50%;
    display: flex;
    flex-direction: column;
    gap: var(--scm-icon-spacing, 10px);
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.scm-style-sidebar.scm-position-left {
    left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    transform: translateY(-50%);
}

.scm-style-sidebar.scm-position-right {
    right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    transform: translateY(-50%);
}

.scm-style-sidebar.scm-position-center {
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Contact List */
.scm-contact-list {
    display: flex;
    flex-direction: inherit;
    gap: inherit;
    flex-wrap: inherit;
}

/* Contact Channel */
.scm-contact-channel {
    position: relative;
}

/* Channel Logo */
.scm-channel-logo {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
}

.scm-channel-logo img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Contact Item */
.scm-contact-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--scm-icon-size, 50px);
    height: var(--scm-icon-size, 50px);
    background-color: var(--scm-background-color, #25D366);
    border-radius: var(--scm-border-radius, 50%);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.scm-contact-item:active {
    transform: scale(0.95);
}

/* Icon */
.scm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--scm-icon-color, #ffffff);
    font-size: calc(var(--scm-icon-size, 50px) * 0.5);
}

.scm-icon svg {
    width: calc(var(--scm-icon-size, 50px) * 0.5);
    height: calc(var(--scm-icon-size, 50px) * 0.5);
    fill: currentColor;
}

/* Label */
.scm-label {
    display: none;
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: var(--scm-font-size, 13px);
    font-family: var(--scm-font-family, 'Arial, sans-serif');
    font-weight: var(--scm-font-weight, normal);
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scm-show-labels .scm-contact-item:hover .scm-label {
    display: block;
    opacity: 1;
}

.scm-position-left .scm-label {
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
}

.scm-position-right .scm-label {
    right: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
}

.scm-position-center .scm-label,
.scm-style-inline .scm-label {
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
}

/* Label Arrow */
.scm-show-labels .scm-label:after {
    content: '';
    position: absolute;
    border: 6px solid transparent;
}

.scm-position-left .scm-label:after {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: rgba(0, 0, 0, 0.85);
}

.scm-position-right .scm-label:after {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: rgba(0, 0, 0, 0.85);
}

.scm-position-center .scm-label:after,
.scm-style-inline .scm-label:after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: rgba(0, 0, 0, 0.85);
}

/* Accessibility */
.scm-contact-item:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* User Count Badge */
.scm-user-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Contact Modal */
.scm-contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

.scm-contact-modal.scm-show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scm-contact-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.scm-contact-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 450px;
    margin: 10% auto;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.scm-contact-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scm-contact-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.scm-contact-modal-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    position: relative;
}

/* Sol üst kanal ikonu (WhatsApp, Telegram vb) */
.scm-contact-modal-logo-small {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 8px;
    box-sizing: border-box;
}

.scm-contact-modal-logo-small svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}

/* Orta büyük firma logosu (dikdörtgen - ilanvan.com yerine) */
.scm-contact-modal-logo-main {
    margin: 0 auto 20px;
    max-width: 200px;
}

.scm-contact-modal-logo-main-img {
    width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

.scm-contact-modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    color: #fff;
}

.scm-contact-modal-icon svg {
    width: 35px;
    height: 35px;
    fill: currentColor;
}

.scm-contact-modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.scm-contact-modal-body {
    padding: 25px;
}

.scm-contact-modal-subtitle {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.scm-contact-modal-users {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scm-contact-modal-user {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
    gap: 15px;
}

.scm-contact-modal-user:hover {
    background: #fff;
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.scm-contact-modal-user-info {
    flex: 1;
}

.scm-contact-modal-user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
    order: 2;
}

.scm-contact-modal-user-name {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 3px;
}

.scm-contact-modal-user-contact {
    display: block;
    font-size: 13px;
    color: #999;
}

.scm-contact-modal-user-arrow {
    color: #667eea;
    font-size: 20px;
    flex-shrink: 0;
    order: 3;
}

/* Shadow Enabled */
.scm-shadow-enabled .scm-contact-item {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Animation Enabled */
.scm-animation-enabled .scm-contact-item {
    transition: all 0.3s ease;
}

.scm-animation-enabled .scm-contact-item:hover {
    transform: scale(1.1);
}

/* Mobile Responsive Modal */
@media (max-width: 768px) {
    .scm-contact-modal-content {
        width: 95%;
        margin: 20% auto;
    }
    
    .scm-contact-modal-header {
        padding: 25px 15px 15px;
    }
    
    .scm-contact-modal-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    
    .scm-contact-modal-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .scm-contact-modal-title {
        font-size: 20px;
    }
    
    .scm-contact-modal-body {
        padding: 20px 15px;
    }
    
    .scm-contact-modal-user {
        padding: 12px 15px;
    }
    
    .scm-contact-modal-user-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin-right: 12px;
    }
    
    .scm-contact-modal-user-name {
        font-size: 15px;
    }
}

/* Dark Mode Support for Modal */
@media (prefers-color-scheme: dark) {
    .scm-contact-modal-content {
        background: #2a2a2a;
    }
    
    .scm-contact-modal-close {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .scm-contact-modal-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .scm-contact-modal-subtitle {
        color: #aaa;
    }
    
    .scm-contact-modal-user {
        background: #333;
        border-color: #444;
        color: #fff;
    }
    
    .scm-contact-modal-user:hover {
        background: #3a3a3a;
        border-color: #667eea;
    }
    
    .scm-contact-modal-user-name {
        color: #fff;
    }
    
    .scm-contact-modal-user-contact {
        color: #999;
    }
}

/* Print */
@media print {
    .scm-contact-container {
        display: none !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .scm-style-floating {
        bottom: 10px;
    }
    
    .scm-style-floating.scm-position-left {
        left: 10px;
    }
    
    .scm-style-floating.scm-position-right {
        right: 10px;
    }
    
    .scm-contact-item {
        width: calc(var(--scm-icon-size, 50px) * 0.9);
        height: calc(var(--scm-icon-size, 50px) * 0.9);
    }
    
    .scm-icon {
        font-size: calc(var(--scm-icon-size, 50px) * 0.45);
    }
    
    .scm-icon svg {
        width: calc(var(--scm-icon-size, 50px) * 0.45);
        height: calc(var(--scm-icon-size, 50px) * 0.45);
    }
    
    .scm-style-inline {
        padding: 15px;
        gap: calc(var(--scm-icon-spacing, 10px) * 0.8);
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .scm-style-sidebar {
        padding: 12px 8px;
    }
}

/* Widget Stil */
.widget .scm-contact-container {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

.widget .scm-contact-list {
    justify-content: center;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .scm-style-sidebar {
        background: rgba(30, 30, 30, 0.95);
    }
}

/* Loading State */
.scm-contact-item.scm-loading {
    opacity: 0.6;
    pointer-events: none;
}

.scm-contact-item.scm-loading:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--scm-icon-color, #ffffff);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hover Effects - Advanced */
.scm-contact-item.scm-hover-zoom:hover {
    transform: scale(1.1);
}

.scm-contact-item.scm-hover-rotate:hover {
    transform: rotate(15deg);
}

.scm-contact-item.scm-hover-bounce:hover {
    animation: bounce 0.5s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Badge/Notification Dot */
.scm-contact-item .scm-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid #fff;
}

/* Tooltip Alternative */
.scm-contact-item[data-tooltip]:hover:before {
    content: attr(data-tooltip);
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 10;
}

/* Channel Specific Colors */
.scm-contact-channel[data-channel="whatsapp"] .scm-contact-item {
    background-color: #25D366;
}

.scm-contact-channel[data-channel="telegram"] .scm-contact-item {
    background-color: #0088cc;
}

.scm-contact-channel[data-channel="email"] .scm-contact-item {
    background-color: #EA4335;
}

.scm-contact-channel[data-channel="phone"] .scm-contact-item {
    background-color: #34B7F1;
}

.scm-contact-channel[data-channel="instagram"] .scm-contact-item {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.scm-contact-channel[data-channel="twitter"] .scm-contact-item {
    background-color: #000000;
}

.scm-contact-channel[data-channel="tiktok"] .scm-contact-item {
    background: linear-gradient(45deg, #000000 0%, #ee1d52 50%, #69c9d0 100%);
}
