/* pads.css */

hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #eee;
}

.bp-pad-container {
    margin: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.bp-pad-table {
    width: 100%;
    border-collapse: collapse;
}

.bp-pad-table button {
    margin-left: 5px;
    margin-right: 5px;
}

.bp-pad-table th,
.bp-pad-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    justify-content: center;
    align-items: center;
}

/*
.bp-pad-table th {
    background-color: #e9e9e9;
}

.bp-pad-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.bp-pad-table tr:hover {
    background-color: #f1f1f1;
}
*/

.bp-pad-editor {
    text-align: left;
    margin: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    max-width: 500px;
}

#pads-editor {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pre-installation-message {
    width: 100%;
}

.bp-pad-post-install {
    text-align: left
}

#pads-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
    min-width: 500px;
}

.bp-pad-container {
    margin: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.pad-editor {}

.pad-editor-holder {
    height: 500px !important;
    padding: 16px;

}

.bp-pad-form {
    display: flex;
    flex-direction: column;
    position: relative;
}

.bp-pad-input,
.bp-pad-textarea,
.bp-pad-select {
    padding: 8px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.bp-pad-button {
    background-color: #4CAF50 !important;
    color: white !important;
    padding: 10px 15px;
    margin: 10px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.bp-pad-button:hover {
    background-color: #45a049 !important;
}

.pad-code-editor {
    display: none;
}

.bp-pad-templates {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
}

.pads-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-indicator {
    color: #0066cc;
    font-size: 0.9em;
    margin-top: 5px;
    margin-bottom: 10px;
    height: 20px;
    position: absolute;
    left: 50px;
    top: -4px;
}

/* Adding animations for visual feedback */
@keyframes fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.status-indicator {
    animation: fade 1s ease-in-out;
}

/* Additional styling if you want to make it more noticeable when active */
.status-indicator.active {
    color: #0066cc;
    font-weight: bold;
}

.coming-soon {
    font-size: 250px;

    font-weight: bold;
    color: #2F855A;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);

}

#buddy-pads {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 50px;
    padding-left: 50px;
    padding-right: 50px;
    overflow: visible !important

}

/* the new styles */
/* Pads Upload Files - UI Styling */
#pads-upload-files {
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 20px auto;
    font-family: 'Arial', sans-serif;
}

.pads-upload-files-pad-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.pads-upload-files-pad-info label {
    font-weight: bold;
    margin-bottom: 5px;
}

.padUrl {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    font-size: 14px;
    min-width: 400px;
}

.bp-pad-manage {
    text-align: center;
    margin-top: 10px;
}

.bp-pad-manage h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.bp-pad-manage h3 {
    font-size: 16px;
}

.openPadButton {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    margin-left: 10px;
}

.openPadButton:hover {
    background: #0056b3;
}



/* Container for the FAQ */
.pads-faq {
    max-width: 800px;
    margin-top: 10px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Heading */
.pads-faq h1 {
    font-size: 2.5em;
    /* color: #2c3e50; */
    margin-bottom: 20px;
    text-align: center;
}

/* Horizontal Line */
.pads-faq hr {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 20px 0;
}

/* Subheadings */
.pads-faq h4 {
    font-size: 1.5em;
    /* color: #34495e !important; */
    margin-bottom: 10px;
}

/* Paragraphs */
.pads-faq p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Links */
.pads-faq a {
    color: #3498db;
    text-decoration: none;
}

.pads-faq a:hover {
    text-decoration: underline;
}

/* Buttons */
.pads-faq button.open-app {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pads-faq button.open-app:hover {
    background-color: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pads-faq {
        padding: 15px;
    }

    .pads-faq h1 {
        font-size: 2em;
    }

    .pads-faq h4 {
        font-size: 1.3em;
    }

    .pads-faq p {
        font-size: 1em;
    }

    .pads-faq button.open-app {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

/* app list / buddy pads install screen */
.bp-pads-container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
}

.bp-pads-sidebar {
    width: 200px;
    flex-shrink: 0;
    /* 
    position: sticky;
    top: 0;
    */
    align-self: flex-start;
    height: fit-content; 
    z-index: 10;
}


.bp-pads-sidebar-title {
    font-size: 18px;
    margin-bottom: 15px;
}

.bp-pads-category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bp-pads-category-btn {
    padding: 10px;
    font-size: 16px;
    border: 1px solid;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
}

.bp-pads-category-btn:hover,
.bp-pads-category-active {
    opacity: 0.8;
}

.bp-pads-content {
    flex-grow: 1;
    text-align: center;
}

.bp-pads-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.bp-pads-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.bp-pads-app {
    text-align: center;
    max-width: 220px;
    flex: 1 1 calc(33.333% - 20px);
    /* Aim for ~3 columns */
    min-width: 250px;
    display: flex;
    flex-direction: column;
    padding: 15px;
    border: 1px solid;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bp-pads-app-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
    align-self: center;
}

.bp-pads-app-info {
    flex-grow: 1;
}

.bp-pads-app-label {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: bold;
}

.bp-pads-app-description {
    margin: 0 0 10px;
    font-size: 14px;
}

.bp-pads-app-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.bp-pads-btn {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    min-width: 80px;
    text-align: center;
    position: relative;
}

.bp-pads-btn:hover:not(.bp-pads-btn-loading) {
    opacity: 0.8;
}

.bp-pads-btn-loading {
    cursor: wait;
    opacity: 0.7;
    pointer-events: none;
    /* Prevent clicks during loading */
}

.bp-pads-app-metadata {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 10px;
    justify-content: center;
    gap: 15px;
}

/* Optional spinner (pure CSS) */
.bp-pads-btn-loading::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid;
    border-radius: 50%;
    border-top-color: transparent;
    animation: bp-pads-spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.bp-pads-app-author {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
}

.bp-pads-app-author-label {
    font-weight: 500;
    margin-right: 4px;
}

.bp-pads-app-author-value {}

.bp-pads-app-install-count {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
}

.bp-pads-app-install-count-label {
    font-weight: 500;
    margin-right: 4px;
}

.bp-pads-app-install-count-value {
    font-weight: bold;
}

@keyframes bp-pads-spin {
    to {
        transform: rotate(360deg);
    }
}
@media (max-width: 767px) and (pointer: coarse) and (hover: none) {
    /* Set base font size for consistency (optional, only if not already set) */
    html {
        font-size: 16px; /* Adjust to 14px for smaller scaling if needed */
    }

    #buddy-pads {
        padding: 0px;
    }
    
    .bp-pads-category-btn {
        padding: 0.75rem; /* ~12px, added for touch-friendly tap target */
        font-size: 1rem; /* ~16px, readable */
    }

    .bp-pads-container {
        display: flex;
        flex-direction: column; /* Unchanged, good for stacking */
    }

    .bp-pads-sidebar {
        width: 100%; /* Unchanged, full-width is good */
    }

    .bp-pads-category-list {
        flex-direction: row; /* Unchanged */
        flex-wrap: wrap; /* Unchanged */
        gap: 1rem; /* ~16px, reduced from 30px */
    }

    .bp-pads-app {
        flex: 1 1 100%; /* Single column for mobile, overrides calc(50% - 20px) */
        min-width: 10rem; /* ~160px, reduced from 200px */
        max-width: 100%; /* Unchanged */
    }

    .bp-pads-app-icon {
        width: 3rem; /* ~48px, reduced from 128px */
        height: 3rem;
    }

    .bp-pads-app-author > span {
        font-size: 1rem; /* ~16px, readable */
    }

    .bp-pads-app-install-count > span {
        font-size: 1rem; /* ~16px, readable */
    }

    .bp-pads-app-actions {
        flex-direction: column; /* Unchanged */
        gap: 0.5rem; /* ~8px, unchanged but in rem */
    }

    .bp-pads-btn {
        width: 100%; /* Unchanged, full-width is good */
        padding: 0.75rem; /* ~12px, added for touch-friendly tap target */
    }

    .pad-editor-holder {
        padding: 0;
    }

    .buddy-apps-tabs {
        display: none !important;
    }

}