/* Mobile-spezifische Anpassungen für Zeitstrudel */

@media screen and (max-width: 768px) {
    /* Aktionsbuttons für Projekte */
    .project-header {
        position: relative;
        overflow: hidden;
    }
    
    .project-actions {
        position: absolute;
        right: -150px;
        top: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 0;
        background-color: rgba(0,0,0,0.5);
    }
    
    .project-header.expanded .project-actions {
        right: 30px;
    }
    
    /* Aktionsbuttons für Tasks */
    .tasks li {
        position: relative;
        overflow: hidden;
    }
    
    .task-content {
        position: relative;
        overflow: hidden;
    }
    
    .task-actions {
        position: absolute;
        display: flex;
        align-items: center;
        height: 100%;
        top: 0;
        right: -150px;
        background-color: rgba(0,0,0,0.5);
        transition: right 0.3s ease;
        z-index: 0;
    }
    
    .expanded{
        right: 0px; /* Platz für den Expand-Button */
    }
    
    .expand{
        position: absolute;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 100%;
        right: 0px;
        top: 0px;
        background-color: rgba(0,0,0,0.5);
        border: none;
        cursor: pointer;
        z-index: 1;
    }
    
    .expand i {
        color: #666;
        transition: transform 0.3s ease;
    }

    .task-actions button {
        margin-left: 5px;
    }

    .task-content.expanded .task-actions {
        right: 30px;
    }
    
    /* Rotation des Pfeils, wenn der Task expandiert ist */
    .task-content.expanded .expand i {
        transform: rotate(180deg);
    }
    


   /*  .project-header .expand {
        
        background: none;
        border: none;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        transition: background-color 0.2s;
    } */
    
    .project-header .expand i {
        color: white;
        transition: transform 0.3s ease;
    }

    /* Rotation des Pfeils, wenn expandiert */
    .project-header.expanded .expand i {
        transform: rotate(180deg);
    }

    /* Basis-Layout */
    html {
        height: 100%;
        width: 100%;
        position: relative;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        -webkit-tap-highlight-color: transparent;
    }

    body {
        min-height: 100%;
        width: 100%;
        position: relative;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }

    /* Verbesserungen für Touch-Interaktionen */
    button, 
    .project-header,
    .task-content,
    .task-actions button,
    .project-actions button,
    .add-button {
        min-height: 30px; /* Größerer Touch-Target für iOS */
        touch-action: manipulation;
    }

    /* Eingabefelder für iOS optimieren */
    input, 
    textarea, 
    select {
        font-size: 12px !important; /* Verhindert Zoom auf iOS */
        touch-action: manipulation;
    }

    /* Verhindern von Text-Selektion außerhalb von Eingabefeldern */
    * {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    /* Erlauben von Text-Selektion in Eingabefeldern */
    input, textarea, [contenteditable="true"] {
        -webkit-touch-callout: default;
        -webkit-user-select: text;
        user-select: text;
    }

    /* Modal-Anpassungen */
    .modal {
        width: 70%;
        max-width: none;
        max-height: 50vh;
        padding: 0px;
    }
    .modal button {
        padding: 4px 8px;
    }

    /* Hauptcontainer */
    #app {
        position: relative;
        height: auto;
        min-height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Lizenzfeld mobile Anpassungen */
    .license-section {
        margin-bottom: 15px;
        padding: 0;
    }

    .license-box {
        padding: 15px;
    }

    .license-box h3 {
        font-size: 1.1rem;
    }

    .license-description {
        font-size: 0.9rem;
    }

    .license-input-group {
        flex-direction: column;
        gap: 10px;
    }

    .license-button {
        width: 100%;
        justify-content: center;
    }

    .license-hint {
        font-size: 0.8rem;
    }

    .license-purchase-link {
        font-size: 0.85rem;
        margin-top: 12px;
    }

    .license-thank-you-content h3 {
        font-size: 1.2rem;
    }

    .license-thank-you-message {
        font-size: 0.9rem;
    }
}

/* Kleinere Bildschirme */
@media screen and (max-width: 480px) {
    .project {
        margin-bottom: 1rem;
    }
    
    
    .modal {
        padding: 20px;
    }
}

/* iOS PWA spezifische Anpassungen */
@media (display-mode: standalone) {
    body {
        position: relative;
    }
    
    input, 
    select, 
    textarea,
    button {
        -webkit-appearance: none;
        appearance: none;
    }
} 