/* PWA Manifest Generator Styles */

.tool-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.manifest-form {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1.25rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group input[type="color"] {
    height: 40px;
    padding: 0.25rem;
    cursor: pointer;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button input {
    flex: 1;
}

.input-with-button button {
    flex-shrink: 0;
}

/* Icon List */
.icon-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.icon-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.icon-thumbnail {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.icon-details {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    align-items: center;
}

.icon-size,
.icon-type {
    font-size: 0.75rem;
    color: #6c757d;
}

.icon-purpose {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 3px;
}

.remove-icon-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.remove-icon-btn:hover {
    background: #c82333;
}

/* Categories List */
.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: #e9ecef;
    border-radius: 20px;
    font-size: 0.875rem;
}

.category-name {
    color: #495057;
}

.remove-category-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}

.remove-category-btn:hover {
    background: #5a6268;
}

/* Screenshots List */
.screenshots-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.screenshot-item {
    position: relative;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.screenshot-thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.screenshot-details {
    padding: 0.5rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.screenshot-size,
.screenshot-type {
    margin-bottom: 0.25rem;
}

.remove-screenshot-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.remove-screenshot-btn:hover {
    background: rgba(200, 35, 51, 0.9);
}

/* Manifest Output */
.manifest-output {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.output-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.25rem;
    font-weight: 600;
}

.output-buttons {
    display: flex;
    gap: 0.5rem;
}

.manifest-code {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 600px;
    overflow-y: auto;
    margin: 0;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tool-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .manifest-output {
        position: static;
    }
}

@media (max-width: 768px) {
    .manifest-form,
    .manifest-output {
        padding: 1rem;
    }
    
    .output-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .output-buttons {
        justify-content: center;
    }
    
    .icon-details {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .screenshots-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .input-with-button {
        flex-direction: column;
    }
    
    .output-buttons {
        flex-direction: column;
    }
    
    .icon-item {
        flex-direction: column;
        text-align: center;
    }
    
    .icon-details {
        width: 100%;
    }
}