/* Modern Components - WWTEC 2024 */

/* Cards */
.modern-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255,255,255,0.1) 50%,
        transparent 100%
    );
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.modern-card:hover::before {
    transform: translateX(100%) rotate(45deg);
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Unified Modern Button Styles - Based on Personnel Tahsis Design */
.modern-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.modern-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.modern-button:hover::before {
    transform: translateX(100%);
}

.modern-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.2);
    color: white;
    text-decoration: none;
}

/* Button Variants */
.modern-button-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.modern-button-primary:hover {
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.2);
    color: white;
}

.modern-button-secondary {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.modern-button-secondary:hover {
    background: #3498db;
    color: white;
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.2);
}

.modern-button-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.modern-button-outline:hover {
    background: white;
    color: #3498db;
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

/* Forms */
.modern-form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.modern-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
    background: var(--white);
}

.modern-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
    outline: none;
}

.modern-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    padding: 0 8px;
    color: var(--text-light);
    transition: all 0.3s ease;
    pointer-events: none;
}

.modern-input:focus + .modern-label,
.modern-input:not(:placeholder-shown) + .modern-label {
    top: 0;
    transform: translateY(-50%) scale(0.8);
    color: var(--primary);
}

/* Alerts */
.modern-alert {
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.modern-alert-success {
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid rgba(72, 187, 120, 0.2);
    color: #2f855a;
}

.modern-alert-error {
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid rgba(245, 101, 101, 0.2);
    color: #c53030;
}

.modern-alert-warning {
    background: rgba(236, 201, 75, 0.1);
    border: 1px solid rgba(236, 201, 75, 0.2);
    color: #b7791f;
}

.modern-alert-info {
    background: rgba(66, 153, 225, 0.1);
    border: 1px solid rgba(66, 153, 225, 0.2);
    color: #2b6cb0;
}

/* Badges */
.modern-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.modern-badge-primary {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.modern-badge-success {
    background: rgba(72, 187, 120, 0.1);
    color: #2f855a;
}

.modern-badge-warning {
    background: rgba(236, 201, 75, 0.1);
    color: #b7791f;
}

.modern-badge-error {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
}

/* Tooltips */
.modern-tooltip {
    position: relative;
    display: inline-block;
}

.modern-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0,0,0,0.8);
    color: white;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modern-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

/* Progress Bars */
.modern-progress {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.modern-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Checkboxes */
.modern-checkbox {
    position: relative;
    display: inline-block;
}

.modern-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.modern-checkbox-mark {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modern-checkbox input:checked + .modern-checkbox-mark {
    background: var(--primary);
    border-color: var(--primary);
}

.modern-checkbox-mark::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: all 0.3s ease;
}

.modern-checkbox input:checked + .modern-checkbox-mark::after {
    opacity: 1;
}

/* Switches */
.modern-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.modern-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.modern-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border-radius: 34px;
}

.modern-switch-slider::before {
    position: absolute;
    content: '';
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.modern-switch input:checked + .modern-switch-slider {
    background-color: var(--primary);
}

.modern-switch input:checked + .modern-switch-slider::before {
    transform: translateX(24px);
}

/* Dropdowns */
.modern-dropdown {
    position: relative;
    display: inline-block;
}

.modern-dropdown-toggle {
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modern-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.modern-dropdown:hover .modern-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.modern-dropdown-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

/* Modals */
.modern-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modern-modal.active {
    opacity: 1;
    visibility: visible;
}

.modern-modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modern-modal.active .modern-modal-content {
    transform: scale(1);
}

/* Tabs */
.modern-tabs {
    display: flex;
    border-bottom: 2px solid rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.modern-tab {
    padding: 12px 24px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.modern-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.modern-tab.active {
    color: var(--primary);
}

.modern-tab.active::after {
    transform: scaleX(1);
}

/* Accordions */
.modern-accordion {
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.modern-accordion-header {
    padding: 16px;
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.modern-accordion-content {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.modern-accordion.active .modern-accordion-content {
    padding: 16px;
    max-height: 500px;
}

/* Tables */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0;
}

.modern-table th,
.modern-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.modern-table th {
    background: rgba(0,0,0,0.02);
    font-weight: 600;
}

.modern-table tr:hover {
    background: rgba(0,0,0,0.02);
}

/* Pagination */
.modern-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 1rem 0;
}

.modern-page-item {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-page-item:hover {
    background: rgba(0,0,0,0.05);
}

.modern-page-item.active {
    background: var(--primary);
    color: white;
}
