/**
 * Advanced Shortcodes Styles for Puntilla SSO
 * 
 * @package PuntillaSSO
 * @version 1.0.0
 */

/* ===== SHORTCODES AVANZADOS ===== */

/* Role Content Shortcode */
.puntilla-role-content {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
    background: #f8f9fa;
    border-left: 4px solid #007cba;
}

.puntilla-role-content.role-distribution {
    border-left-color: #28a745;
}

.puntilla-role-content.role-publishing {
    border-left-color: #ffc107;
}

.puntilla-role-content.role-split_payments {
    border-left-color: #17a2b8;
}

.puntilla-role-content.role-administrator {
    border-left-color: #dc3545;
}

/* Curve Dashboard Shortcode */
.puntilla-curve-dashboard {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    margin: 2rem 0;
}

.puntilla-curve-dashboard h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* PIs Section */
.curve-pis-section {
    margin-bottom: 2rem;
}

.pis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.pi-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.pi-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.pi-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.pi-type {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.pi-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pi-status.active {
    background: #d4edda;
    color: #155724;
}

.pi-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Actions Section */
.curve-actions-section {
    margin-bottom: 2rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.action-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,124,186,0.3);
}

.action-btn i {
    font-size: 1.2rem;
}

/* User PIs Shortcode */
.puntilla-user-pis {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.puntilla-user-pis h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.pis-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007cba;
}

.pi-item .pi-name {
    font-weight: 600;
    color: #2c3e50;
}

.pi-item .pi-type {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Conditional Form Shortcode */
.puntilla-conditional-form {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.puntilla-conditional-form h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0,124,186,0.1);
}

.submit-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

/* Admin Panel Shortcode */
.puntilla-admin-panel {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.puntilla-admin-panel h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    text-align: center;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
}

.admin-section {
    margin-bottom: 2rem;
}

.admin-section h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.admin-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.admin-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.admin-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,124,186,0.3);
    color: white;
    text-decoration: none;
}

.admin-btn i {
    font-size: 1.2rem;
}

/* User Stats Shortcode */
.puntilla-user-stats {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.puntilla-user-stats h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
}

.user-info {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.user-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.user-email {
    color: #6c757d;
    margin-bottom: 1rem;
}

.user-role {
    margin-top: 1rem;
}

.role-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.role-distribution {
    background: #d4edda;
    color: #155724;
}

.role-badge.role-publishing {
    background: #fff3cd;
    color: #856404;
}

.role-badge.role-split_payments {
    background: #d1ecf1;
    color: #0c5460;
}

.role-badge.role-administrator {
    background: #f8d7da;
    color: #721c24;
}

.pis-stats,
.curve-stats {
    margin-bottom: 1rem;
}

.pis-stats h4,
.curve-stats h4 {
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.pis-count {
    font-size: 2rem;
    font-weight: 700;
    color: #007cba;
    text-align: center;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.stats-row:last-child {
    border-bottom: none;
}

/* Curve Stats Shortcode */
.puntilla-curve-stats {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.puntilla-curve-stats h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
}

.totals-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.stat-item .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #007cba;
    margin-bottom: 0.5rem;
}

.stat-item .stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-section h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid #28a745;
}

.activity-type {
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.activity-description {
    flex: 1;
    margin: 0 1rem;
    color: #495057;
}

.activity-date {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Role Badge Shortcode */
.puntilla-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.puntilla-role-badge.no-role {
    background: #f8d7da;
    color: #721c24;
}

.puntilla-role-badge.role-distribution {
    background: #d4edda;
    color: #155724;
}

.puntilla-role-badge.role-publishing {
    background: #fff3cd;
    color: #856404;
}

.puntilla-role-badge.role-split_payments {
    background: #d1ecf1;
    color: #0c5460;
}

.puntilla-role-badge.role-administrator {
    background: #f8d7da;
    color: #721c24;
}

.role-icon {
    font-size: 1rem;
}

/* Quick Actions Shortcode */
.puntilla-quick-actions {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.puntilla-quick-actions h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    width: 100%;
    justify-content: center;
}

.quick-action-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.quick-action-btn i {
    font-size: 1.2rem;
}

/* Loading States */
.loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .pis-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-actions {
        grid-template-columns: 1fr;
    }
    
    .totals-section {
        grid-template-columns: 1fr;
    }
    
    .puntilla-curve-dashboard,
    .puntilla-conditional-form,
    .puntilla-admin-panel {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .activity-description {
        margin: 0;
    }
}

/* Icon Classes */
.icon-document::before { content: "📄"; }
.icon-transaction::before { content: "💳"; }
.icon-download::before { content: "⬇️"; }
.icon-users::before { content: "👥"; }
.icon-user-plus::before { content: "👤"; }
.icon-shield::before { content: "🛡️"; }
.icon-link::before { content: "🔗"; }
.icon-settings::before { content: "⚙️"; }
.icon-database::before { content: "🗄️"; }
.icon-distribution::before { content: "📊"; }
.icon-publish::before { content: "📝"; }
.icon-money::before { content: "💰"; }
.icon-admin::before { content: "👑"; }
.icon-user::before { content: "👤"; }
.icon-rocket::before { content: "🚀"; }
