/* InHostify Tools - Public Styles */

/* Dashboard */
.inhostify-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.credits-display {
    font-size: 24px;
    font-weight: bold;
}

.credits-amount {
    color: #ffd700;
}

/* Stats Cards */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 40px;
    color: #667eea;
}

.stat-info h3 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.stat-info p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

/* Tools Grid */
.inhostify-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.inhostify-tool-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.inhostify-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.tool-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.inhostify-tool-card h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.inhostify-tool-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    min-height: 60px;
}

.tool-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 12px;
}

.tool-meta .cost {
    background: #ffd700;
    color: #333;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
}

.tool-meta .category {
    background: #e0e0e0;
    color: #666;
    padding: 5px 10px;
    border-radius: 20px;
}

.inhostify-use-tool-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
}

.inhostify-use-tool-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Table */
.inhostify-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.inhostify-table thead {
    background: #667eea;
    color: white;
}

.inhostify-table th,
.inhostify-table td {
    padding: 15px;
    text-align: left;
}

.inhostify-table tbody tr:hover {
    background: #f5f5f5;
}

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.badge-credit {
    background: #00a32a;
    color: white;
}

.badge-debit {
    background: #d63638;
    color: white;
}

/* Dashboard Section */
.dashboard-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.dashboard-section h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Credits Badge */
.inhostify-credits-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .inhostify-tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Spinner */
.inhostify-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal/Popup */
.inhostify-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

.inhostify-modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s;
}

.inhostify-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.inhostify-modal-close:hover {
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* User Menu */
.inhostify-user-menu {
    position: relative;
    display: inline-block;
}

.inhostify-user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    padding: 5px 15px 5px 5px;
    border-radius: 30px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.inhostify-user-menu-toggle:hover {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.inhostify-user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.inhostify-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.inhostify-user-name {
    font-weight: 700;
    font-size: 14px;
    color: #333;
}

.inhostify-user-credits {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.inhostify-user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 8px;
    z-index: 1000;
    margin-top: 12px;
    transform-origin: top right;
}

.inhostify-user-menu.active .inhostify-user-dropdown {
    display: block;
    animation: slideDown 0.3s ease;
}

.inhostify-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.inhostify-user-dropdown a:hover {
    background: #f1f5f9;
    color: #667eea;
}

.inhostify-user-dropdown i {
    width: 20px;
    color: #94a3b8;
    transition: color 0.2s;
}

.inhostify-user-dropdown a:hover i {
    color: #667eea;
}
