/**
 * License Page Styles
 *
 * Dedicated CSS file for license management page
 * Extracted from main admin CSS for better organization
 */

/* License screen  */

.ipb_license .ipd_content p {
    padding: 5px !important;
    font-weight: bold;
    width: 100%;
    margin: 10px 0;
    line-height: 20px;
}

.ipb_license
 .ipd_content {
    width: 75%;
}

.ipb_license form .top_cont {
    justify-content: space-between;
    display: flex;
    margin: 0 0 15px 0;
}

.ipb_license
 .thumb {
    width: 24%;
}

.ipb_license
 input[type="text"] {
    font-size: 14px;
    width: 100%;
    border-radius: 24px;
    border: 1px solid #1A73E8;
    color: black;
}

/* Hide legacy images in license tabs */
.ipb_license .thumb img {
    display: none !important;
}

/* License card container - horizontal table layout */
.license_grids {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.license_grids .ipb_license {
    padding: 12px 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #E0E0E0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* License row - horizontal table layout */
.ipb_license .license_row {
    display: grid;
    grid-template-columns: 160px 1fr 120px 70px;
    gap: 8px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* License name section - Icon + Name */
.ipb_license .license_name_section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ipb_license .license_name_section .thumb {
    width: 21px;
    height: 21px;
    background: #1A73E8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ipb_license .license_name_section .thumb i {
    font-size: 12px;
    color: white !important;
    display: inline-block;
}

.ipb_license .license_name_section .thumb i::before {
    color: white !important;
}

.ipb_license .license_name_section h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #202124;
    line-height: 1.3;
}

/* License key section - Input + Button */
.ipb_license .license_key_section {
    display: flex;
    align-items: center;
    min-width: 0;
}

.ipb_license .license_form_inline {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.ipb_license .license_form_inline input[type="password"] {
    flex: 0 0 auto;
    width: 280px;
    max-width: 100%;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #E0E0E0;
    color: #202124;
    padding: 8px 12px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.ipb_license .license_form_inline input[type="password"]:focus {
    outline: none;
    border-color: #1A73E8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

/* License expiry section */
.ipb_license .license_expiry_section {
    display: flex;
    align-items: center;
}

.ipb_license .license_expiry_section .expiry_value {
    font-size: 13px;
    color: #5F6368;
    font-weight: 500;
}

/* License validate section */
.ipb_license .license_validate_section {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 0;
    margin-left: 0;
}

.ipb_license .license_validate_section .validate_value {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: nowrap;
    margin: 0;
}

.ipb_license .license_validate_section .validate_value.status-active {
    color: #03E334;
    background: rgba(3, 227, 52, 0.1);
}

.ipb_license .license_validate_section .validate_value.status-inactive {
    color: #EA4335;
    background: rgba(234, 67, 53, 0.1);
}

/* License error message */
.ipb_license .license_error_message {
    margin-top: 8px;
    grid-column: 1 / -1;
}

.ipb_license .license_error_message p {
    margin: 0;
}

/* License buttons */
.ipb_license button {
    transition: all 0.2s ease;
    cursor: pointer;
    background: #1A73E8;
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ipb_license button:hover {
    background: #1557B0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(26, 115, 232, 0.2);
}

/* Active button - Green/Blue */
.ipb_license button.ipb_license_active {
    background: #1A73E8;
}

.ipb_license button.ipb_license_active:hover {
    background: #D32F2F;
}

/* Remove button - Red on hover */
.ipb_license button[name*="deactivate"],
.ipb_license button[name*="remove"] {
    background: #D32F2F;
}

.ipb_license button[name*="deactivate"]:hover,
.ipb_license button[name*="remove"]:hover {
    background: #B71C1C;
}

.ipb_license .message {
    margin-top: 8px;
}

.top_lcense_heading {
    margin-top: 90px;
}

.top_lcense_heading h1 {
    margin: 0 0 20px 0;
}

button.ipb_inactive_license {
    color: #5F6368 !important;
    background: #F1F3F4 !important;
    border: 1px solid #DADCE0 !important;
}

button.ipb_inactive_license:hover {
    background: #1A73E8 !important;
    color: white !important;
    border-color: #1A73E8 !important;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .license_grids {
        grid-template-columns: 1fr;
    }

    .ipb_license .license_row {
        grid-template-columns: 150px 1fr 110px 70px;
        gap: 6px;
    }

    .ipb_license .license_form_inline input[type="password"] {
        width: 240px;
    }
}

@media (max-width: 1200px) {
    .ipb_license .license_row {
        grid-template-columns: 140px 1fr 100px 65px;
        gap: 6px;
    }

    .ipb_license .license_form_inline input[type="password"] {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .license_grids {
        grid-template-columns: 1fr;
    }

    .ipb_license .license_row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ipb_license .license_name_section,
    .ipb_license .license_key_section,
    .ipb_license .license_expiry_section,
    .ipb_license .license_validate_section {
        width: 100%;
    }

    .ipb_license .license_form_inline {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .ipb_license .license_form_inline input[type="password"] {
        width: 100%;
        max-width: 100%;
    }
}
