/* Responsive styles for qr-tool */

@media (max-width: 1200px) {
    .qr-app-wrapper {
        padding: 20px;
    }
    .qr-container {
        grid-template-columns: 1fr 350px; /* Adjust preview panel width */
        gap: 25px;
    }
    .qr-header h1 {
        font-size: clamp(2.2rem, 4.5vw, 4rem);
    }
    .qr-header p {
        font-size: clamp(1rem, 1.8vw, 1.3rem);
    }
    .card-glass {
        padding: 20px;
    }
    .tab-item {
        padding: 10px 15px;
        font-size: 1rem;
    }
    label {
        font-size: 0.9rem;
    }
    input, textarea, select {
        padding: 10px 12px;
        font-size: 1rem;
    }
    .input-grid {
        gap: 10px;
    }
    .design-section h3 {
        font-size: 1.6rem;
    }
    .acc-btn {
        font-size: 1.1rem;
        padding: 15px 20px;
    }
    .color-controls {
        gap: 15px;
        padding: 10px;
    }
    .c-item label {
        font-size: 1rem;
    }
    .c-item input[type="color"] {
        width: 45px;
        height: 45px;
    }
    .style-choice {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .logo-presets img {
        width: 38px;
        height: 38px;
    }
    .btn-reset {
        padding: 14px;
        font-size: 1.2rem;
    }
    .qr-preview-panel {
        top: 15px;
    }
    .preview-card {
        padding: 25px;
    }
    .qr-code-wrapper {
        max-width: 300px;
    }
    #canvas-container {
        padding: 15px;
    }
    .download-controls-group, .print-controls-group {
        gap: 10px;
    }
    .btn-dl-select, .btn-dl-button {
        padding: 12px;
        font-size: 1rem;
    }
    #btn-copy-clipboard {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    .hint {
        font-size: 1rem;
    }
    .lang-switcher button {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    .history-section h3 {
        font-size: 1.6rem;
    }
    .history-item {
        padding: 12px;
        font-size: 1rem;
    }
    .history-timestamp {
        font-size: 0.8rem;
    }
    .btn-apply-history {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    .qr-preview-thumbnail {
        width: 80px;
        height: 80px;
    }
    .modal-message {
        font-size: 1.4rem;
    }
    .modal-buttons button {
        padding: 10px 15px;
        font-size: 1.1rem;
    }
    .app-footer { /* German: أنماط التذييل الاستجابية */
        margin-top: 30px;
        padding: 15px;
    }
}

@media (max-width: 1000px) {
    .qr-container {
        grid-template-columns: 1fr;
    }
    .qr-preview-panel {
        position: static;
        order: -1; /* Move preview to the top on smaller screens */
        margin-bottom: 30px;
    }
    .preview-card {
        max-width: 400px;
        margin: 0 auto;
    }
    .qr-code-wrapper {
        max-width: 300px;
    }
    .nav-top {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .lang-switcher {
        order: 3; /* Move language switcher below other elements */
        width: 100%;
        justify-content: center;
    }
    .btn-back {
        order: 1;
    }
    .brand {
        order: 2;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px 10px;
    }
    .qr-header {
        margin-bottom: 30px;
    }
    .qr-header h1 {
        font-size: clamp(1.8rem, 6vw, 3rem);
    }
    .qr-header p {
        font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    }
    .card-glass {
        padding: 15px;
    }
    .config-tabs {
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 0;
        margin-bottom: 20px;
    }
    .tab-item {
        flex-grow: 1;
        max-width: 48%; /* Two items per row */
        font-size: 0.9rem;
        padding: 8px 10px;
    }
    .input-grid {
        grid-template-columns: 1fr; /* Stack inputs */
    }
    input, textarea, select {
        font-size: 0.95rem;
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    label {
        font-size: 0.8rem;
    }
    .design-section h3, .history-section h3 {
        font-size: 1.4rem;
    }
    .acc-btn {
        font-size: 1rem;
        padding: 12px 15px;
    }
    .acc-panel.active {
        padding: 15px;
    }
    .color-controls {
        flex-direction: column;
        gap: 10px;
    }
    .c-item {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    .style-picker {
        flex-wrap: wrap;
        justify-content: center;
    }
    .style-choice {
        flex-basis: 45%; /* Two choices per row */
        max-width: 48%;
        font-size: 0.85rem;
        padding: 7px 10px;
    }
    .logo-categories {
        flex-wrap: wrap;
        justify-content: center;
    }
    .cat-btn {
        font-size: 0.9rem;
        padding: 5px 10px;
    }
    .logo-presets {
        justify-content: center;
    }
    .logo-presets img {
        width: 32px;
        height: 32px;
        padding: 4px;
    }
    .logo-controls .control-item label, .logo-controls .control-item span {
        font-size: 0.8rem;
    }
    .btn-reset {
        padding: 10px;
        font-size: 1rem;
    }
    .preview-card {
        padding: 20px;
    }
    .qr-code-wrapper {
        max-width: 250px;
    }
    #canvas-container {
        padding: 10px;
    }
    .download-controls-group, .print-controls-group {
        grid-template-columns: 1fr; /* Stack download/print buttons */
    }
    .btn-dl-select, .btn-dl-button {
        font-size: 0.9rem;
        padding: 10px;
    }
    #btn-copy-clipboard {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        top: 10px;
        right: 10px;
    }
    .hint {
        font-size: 0.9rem;
    }
    .history-list-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    .history-item {
        font-size: 0.9rem;
    }
    .qr-preview-thumbnail {
        width: 60px;
        height: 60px;
    }
    .modal-message {
        font-size: 1.2rem;
    }
    .modal-buttons button {
        font-size: 1rem;
        padding: 8px 12px;
    }
    .app-footer { /* German: أنماط التذييل الاستجابية */
        margin-top: 20px;
        padding: 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px 8px;
    }
    .qr-header h1 {
        font-size: clamp(1.5rem, 7vw, 2.5rem);
    }
    .qr-header p {
        font-size: clamp(0.8rem, 1.8vw, 1rem);
    }
    .nav-top {
        gap: 10px;
    }
    .brand {
        font-size: 1.5rem;
    }
    .tab-item {
        max-width: 100%; /* One item per row */
        font-size: 0.85rem;
    }
    .style-choice {
        flex-basis: 100%; /* One choice per row */
        max-width: 100%;
    }
    .logo-presets img {
        width: 28px;
        height: 28px;
    }
    .qr-code-wrapper {
        max-width: 200px;
    }
    .history-list-grid {
        grid-template-columns: 1fr; /* Stack history items */
    }
    .modal-message {
        font-size: 1rem;
    }
    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .modal-buttons button {
        max-width: 100%;
    }
}