/* Özel Stiller - TODO Uygulaması */

/* Genel Reset */
* {
    box-sizing: border-box;
}

/* Mobil First Yaklaşımı */
body {
    font-size: 16px; /* iOS zoom engellemek için minimum 16px */
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Touch Target Size - En az 44px */
.btn,
button,
a[role="button"],
input[type="button"],
input[type="submit"],
.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Scroll Bar Özelleştirme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animasyonlar */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Hover Efektleri - Sadece hover destekleyen cihazlar */
@media (hover: hover) {
    .hover-scale:hover {
        transform: scale(1.05);
        transition: transform 0.2s ease;
    }

    .hover-shadow:hover {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        transition: box-shadow 0.3s ease;
    }
}

/* Touch Feedback */
.btn:active,
button:active,
.touch-target:active,
.touching {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* iOS Safari için viewport height fix */
.min-h-screen-mobile {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
}

/* Badge Stilleri */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-gray {
    background-color: #f3f4f6;
    color: #374151;
}

/* Öncelik Renkleri */
.priority-low {
    color: #6b7280;
}

.priority-medium {
    color: #3b82f6;
}

.priority-high {
    color: #f59e0b;
}

.priority-urgent {
    color: #ef4444;
}

/* Status Göstergeleri */
.status-todo {
    color: #6b7280;
}

.status-in-progress {
    color: #3b82f6;
}

.status-completed {
    color: #10b981;
}

.status-cancelled {
    color: #ef4444;
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
}

.mobile-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e40af;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 50;
}

.mobile-nav-menu.active {
    display: block;
}

.mobile-nav-item {
    display: block;
    padding: 1rem;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Takvim Stilleri */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.calendar-day {
    background-color: white;
    min-height: 100px;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    position: relative;
    cursor: pointer;
}

.calendar-day.today {
    background-color: #dbeafe;
    border-color: #3b82f6;
}

.calendar-day.other-month {
    background-color: #f9fafb;
    color: #9ca3af;
}

.calendar-task {
    background-color: #3b82f6;
    color: white;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    margin-bottom: 0.125rem;
    cursor: pointer;
    transition: all 0.2s;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (hover: hover) {
    .calendar-task:hover {
        background-color: #2563eb;
        transform: scale(1.02);
    }
}

/* Kart Stilleri */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
    }
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.card-body {
    padding: 1rem;
}

.card-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

/* Form Stilleri */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    min-height: 44px; /* Touch target */
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control.error {
    border-color: #ef4444;
}

.form-control.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Button Stilleri */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    min-width: 44px;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (hover: hover) {
    .btn:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    }
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

@media (hover: hover) {
    .btn-primary:hover:not(:disabled) {
        background-color: #2563eb;
    }
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

@media (hover: hover) {
    .btn-secondary:hover:not(:disabled) {
        background-color: #4b5563;
    }
}

.btn-success {
    background-color: #10b981;
    color: white;
}

@media (hover: hover) {
    .btn-success:hover:not(:disabled) {
        background-color: #059669;
    }
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

@media (hover: hover) {
    .btn-warning:hover:not(:disabled) {
        background-color: #d97706;
    }
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

@media (hover: hover) {
    .btn-danger:hover:not(:disabled) {
        background-color: #dc2626;
    }
}

.btn-outline {
    background-color: transparent;
    color: #374151;
    border: 1px solid #d1d5db;
}

@media (hover: hover) {
    .btn-outline:hover:not(:disabled) {
        background-color: #f9fafb;
        border-color: #9ca3af;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Breakpoints */

/* Tablet Portrait */
@media (max-width: 768px) {
    /* Navigation için mobil menü göster */
    .desktop-nav {
        display: none;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    /* Kartlar için padding azalt */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: 0.75rem;
    }
    
    /* Takvim günleri daha küçük */
    .calendar-day {
        min-height: 80px;
        padding: 0.25rem;
    }
    
    .calendar-task {
        font-size: 0.5rem;
        padding: 0.125rem;
    }
    
    /* Table responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Button grup için stack layout */
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group-mobile .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Grid responsive */
    .grid-responsive {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Text size adjustments */
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Container padding */
    .container-mobile {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    /* Daha küçük padding */
    .card-header,
    .card-body,
    .card-footer {
        padding: 0.5rem;
    }
    
    /* Takvim daha da küçük */
    .calendar-day {
        min-height: 60px;
        padding: 0.125rem;
        font-size: 0.75rem;
    }
    
    .calendar-task {
        font-size: 0.5rem;
        padding: 0.0625rem 0.125rem;
        margin-bottom: 0.0625rem;
    }
    
    /* Button padding azalt */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Form inputs */
    .form-control {
        padding: 0.625rem;
    }
    
    /* Stats kartları stack */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Modal full screen */
    .modal-mobile {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        border-radius: 0;
        max-width: none;
        max-height: none;
    }
    
    /* Text truncate for small screens */
    .text-truncate-mobile {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 150px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .dark-mode .card {
        background-color: #374151;
        border-color: #4b5563;
    }
    
    .dark-mode .form-control {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .dark-mode .btn-outline {
        color: #f9fafb;
        border-color: #6b7280;
    }
    
    .dark-mode .btn-outline:hover {
        background-color: #4b5563;
        border-color: #9ca3af;
    }
}

/* Utility Classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

.select-none {
    user-select: none;
}

.transition-all {
    transition: all 0.3s ease;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    pointer-events: none;
}

@media (hover: hover) {
    .tooltip:hover::before {
        opacity: 1;
        visibility: visible;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 1px solid #000;
    }
} 